Closed backup1-technicise closed 7 years ago
To run code for Unittest use following command python unittest_Pass_value_for_testing.py -v To run code for Pytest use following command py.test -v pytest_Pass_value_for_testing.py To run code for nose use following command nosetests -v nose_Pass_value_for_testing.py
Basically, I have done unit testing by using 3 different unit testing modules, such as Unittest, Pytest and nose over a json file (Employees.json), which holds the details of various employees of an organisation. The specified format for each field is in a given python file (Reg_exp_Emp_fields.py) and each format is maintained by regular expression. During test, my code will test whether the value of a field (from json file) for an employee is given in a specified format or not, and it shows error msg for unspecified format.