Testing

Page Navigation:

Page Navigation:

 

 


Confidence Level TBD  This article has not been reviewed for accuracy, timeliness, or completeness. Check that this information is valid before acting on it.

Confidence Level TBD  This article has not been reviewed for accuracy, timeliness, or completeness. Check that this information is valid before acting on it.

Unit Tests

Unit tests for individual projects can be run using the standard python setup.py test functionality using the PyTest (https://docs.pytest.org/en/latest/) framework. Unit tests will be run on every commit by the CI system.

Every test module should be located in the test directory immediately below the root of the project. The filename should start with test_ and be followed by a description of what is under test. In general there should be a test module for every python module. In some cases, however, it may make sense to have more than one test module for a given python module. For example, the hysds.utils module contains many functions where each function may have multiple test cases. In this case, it may make sense to have multiple test modules for the hysds.utils module separated by functionality.

The unit tests themselves can use either the builtin unitest module or the pytest module.

Note: JPL employees can also get answers to HySDS questions at Stack Overflow Enterprise: