Running Unit Tests - GeospatialResearch/Digital-Twins GitHub Wiki

The two recommended python test frameworks we support are pytest and unittest.

Running tests on GitHub Actions

We have an action workflow for running unit tests to check for regressions on pull requests as part of our CI strategy. The packages for the testing are configured by the same environment.yml file used for production and development.

Running tests locally

unittest

To run all unit tests using unittest:

  1. Run unittest in the project root:
    # From the root directory of the project
    python -m unittest
    

pytest

To run all unit tests using pytest:

  1. Begin by installing pytest:
    pip install pytest
    
  2. Run pytest in the project root:
    # From the root directory of the project
    python -m pytest