.. _section-license: Testing ======= Many tests have been scripted to allow for validating the functionality of this library. Guidelines ---------- All project code should have test cases built that cover the possible scenarios/values, and validate proper error handling. Generally speaking, each line of code should have "coverage" of a test case. Unit Test --------- Python's `unit_test` library is used for test cases against functions and classes. To run all tests, you can run the following command: .. code-block:: python :linenos: python -m unittest discover tests/unit/ The output will be the number of tests executed and the successful count. Code Coverage ------------- A code coverage report is generated during each build to identify portions of code where a unit test case is not executed. To execute this locally, run the following command: .. code-block:: python :linenos: coverage run -m unittest discover tests/unit/ coverage report -m Reports ^^^^^^^ .. raw:: html