Testing

Running the Test Suite

Run all tests:

pytest tests/

With coverage report:

pytest tests/ --cov=src/gasfir --cov-report=term-missing

Run a specific module:

pytest tests/test_kernels.py -v

Run only performance tests:

pytest tests/test_integration.py::TestPerformanceIntegration -v

Test Structure

File

Contents

test_gasfir.py

High-level API smoke tests, error handling, performance benchmarks

test_kernels.py

Unit tests for individual kernel functions

test_fitting.py

Residual function construction and evaluation

test_integration.py

End-to-end workflows, consistency checks across methods

test_utils.py

Utility function unit tests

CI Coverage

The GitLab CI pipeline runs the full test matrix (Python 3.8–3.12) on every merge request and on every push to main. Coverage reports are published as CI artefacts.