Tests
The test suite is based on pytest and is located in the test/ folder.
Running tests
- Run all tests:
1 | |
- Run one file:
1 | |
- Run one test:
1 | |
Fixtures and shared test setup
Shared fixtures are defined in test/conftest.py (data builders, common objects, report hooks, and helper toggles).
SHOW_FIGURES mechanism
Some tests can display Plotly figures for manual inspection. This behavior is controlled by the show_figures fixture in test/conftest.py.
The fixture reads the SHOW_FIGURES environment variable and enables figure display when it is set to one of:
1trueyes
Examples:
1 | |
1 | |
When SHOW_FIGURES is not set (or set to another value), figures are not shown.
VS Code test debugging configuration
When debugging tests from VS Code, environment variables from your shell are not always propagated to the test debug session.
To ensure SHOW_FIGURES is available, add a debug-test launch configuration in .vscode/launch.json:
1 2 3 4 5 6 7 8 9 10 11 | |
With this configuration, launching tests in debug mode from VS Code will honor the SHOW_FIGURES mechanism.