Install test dependencies:
pip install pytest pytest-cov pytest-timeout pytest-xdistpytestpytest -m "not slow"pytest -m unitpytest -m integrationpytest --cov=. --cov-report=html
open htmlcov/index.html # View coverage in browserpytest -n autopytest test_aux.pypytest -v| File | Description | Test Count |
|---|---|---|
test_aux.py |
Tests for aux.py module (Helmholtz, LaTeX) | 15+ |
test_cleanup.py |
Tests for cleanup.py functionality | 8 |
test_self_heat.py |
Tests for Helmholtz EOS integration | 5 |
test_self_heat_integration.py |
End-to-end workflow tests | 20+ |
Before running tests:
cd _helmholtz
make
cd ..Solution: Compile Helmholtz first
cd _helmholtz && make && cd ..Solution: Ensure you're in the project root directory with:
helm_input_test_data.txthelm_output_test_data.txthelm_table.dat
Solution: Run without slow tests
pytest -m "not slow"Tests run automatically on GitHub Actions:
- Every push to main
- Every pull request
- Daily at midnight UTC
- Can be triggered manually
View results at: https://github.com/[your-repo]/actions
@pytest.mark.unit- Fast unit tests@pytest.mark.integration- Integration tests@pytest.mark.slow- Long-running tests@pytest.mark.helmholtz- Requires Helmholtz executable
# Install dependencies
pip install pytest pytest-cov pytest-timeout pytest-xdist
# Compile Helmholtz
cd _helmholtz && make && cd ..
# Run fast tests only
pytest -m "not slow"
# Run with coverage
pytest --cov=. --cov-report=html
# Run in parallel
pytest -n auto
# Run specific test
pytest test_aux.py::TestHelmholtzCall::test_helmholtz_forward_call
# List all tests without running
pytest --collect-onlyFor detailed documentation, see TESTING.md
For test suite summary, see TEST_SUITE_SUMMARY.md