sayan801 / pyccda

A Python library for CCDA XML files. Part of the BlueButton health information liberation initiative.
1 stars 0 forks source link

Python unit testing using various Python modules ( Unittest, Pytest and nose) #11

Closed backup1-technicise closed 7 years ago

backup1-technicise commented 7 years ago

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.

backup1-technicise commented 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