This guide provides instructions for running unit tests and generating coverage reports for the LEOCraft
project.
To execute all the unit tests in the tests
directory:
python -m unittest discover tests/ -v
To run a specific test module, replace <test_file>
with the desired test file name:
python -m unittest -v tests/<test_file>.py
Example:
python -m unittest -v tests/test_satellite.py
To run all tests and collect coverage data:
coverage run -m unittest discover tests/ -v
To display the coverage report in the terminal:
coverage report
To generate an HTML report for better visualization:
coverage html
Open the generated htmlcov/index.html
file in your browser to view the detailed coverage report.