To download pretrained weights and datasets:
The tests depend on pretrained weights and datasets from Hugging Face. To automatically download the required files, run the following command:
hatch run test:downloadTo run tests:
# Run all tests
hatch run test:test
# Run all unit tests
# (Test individual functions)
hatch run test:unit
# Run all integration tests
# (Test how parts of the application work together)
hatch run test:integration
# Run export tests
hatch run test:exportTo run tests across all supported Python versions:
# Run all tests across all supported Python versions
hatch run test-matrix:test
# Run unit tests across all supported Python versions
hatch run test-matrix:unitTo run unit or integration tests for only a specific use case (e.g. NSS):
First set an environment variable for the usecase, then run the test command:
Linux (bash):
export USECASE=nss && hatch run test:unitWindows (cmd):
set USECASE=nss && hatch run test:unitTo run unit tests from one specific file with tests:
hatch run python -m pytest tests/core/unit/utils/test_checkpoint_utils.pyTo create a test coverage report:
hatch run test:coverage-checkAll available commands in the Hatch environment are listed under scripts when running:
hatch env show