Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

code in python. named task2 functions functions according to can put the unit tests below) to the same module . import unit test class

image text in transcribed

code in python.

named "task2 functions " functions according to can put the unit tests below) to the same module . import unit test class Test Functions (unit test . TestCase) : def test reformat date (self) # [2p] Create a module implement three following unit tests. You valid ("12ac")) and the ( f rom # DD, MM, Y YYY stands for day, month and year respectively 31 . 12 . 2020" , self . assertEqua1 (" reformat date ("20201231" , "DD.w. YYYY") ) 01/12/2020" , self . assertEqua1 ( " "MM/DD/YYYY") ) reformat date ("20200112" 2021-01-01 " , self . assertEquaI ( " reformat date ("20210101" "YYYY-MM-DD") ) self . assertEqua1 (' '2019", "YYYY") ) reformat date ("20190521" , def test exclude worst (self) : # [1.5p] self. assertEquaI ( [4, 6, 10] exclude worst ( [10, 4, 1, self . assertEqua1 ( [6, 10] exclude worst ( [10, 4, 1, 6], exclude=2)) self. assert Equal ( [10], exclude worst ( [10, 4, 1, 6], exclude 3)) def test self. is pin valid (self) assertTrue (is pin valid ("4412") ) self . assert False (is self . assert False (is self . assertFa1se (is self . assertFa1se (is pin pin pin pin '12442") ) valid (' valid ( "122 valid ( " 12.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

e. What are the programs research and clinical focus areas?

Answered: 1 week ago