How to run tests locally¶
Use this guide to run the current pytest suite, generate the coverage artifacts used by the docs build, and choose the right markers during local work.
๐ง Prerequisites¶
- A synced workspace with the
testextra installed - Windows and Excel only if you intend to opt into Excel-marked tests
๐ Steps¶
-
Run the default local suite.
-
Generate the coverage files consumed by the documentation workflow.
-
Use the helper script when you want a preset test mode.
๐งช Current suite¶
- Unit tests for converters, exceptions, exported symbols, and GUI protocols
- Marker registration for
unit,integration,slow, andexcel - Committed Excel integration scenarios in
tests/integration/
๐งช Current repository scope
The integration and excel markers are already part of the test contract, but the committed suite in this repository is currently centered on tests/unit/. Keep the markers when you add new coverage so CI and local filtering stay consistent.
โ๏ธ Add a new test¶
Mark each new test explicitly so selection stays predictable:
Use @pytest.mark.excel only for tests that require a live Excel installation, and keep those scenarios out of the default local run.
โ Result¶
You can run the default suite, produce coverage.xml for the docs build, and choose markers that match the repository's existing test contract.