Repository navigation
Conversation
Add unit/integration/e2e marker definitions to pyproject.toml and set pytestmark at module level on every test file so the type is enforceable both by directory and by marker selection. Move the last flat file, test_cli_lazy_import.py, out of tests/ into the split layout. It mixed types under the CliRunner-vs-plain-import distinction — one test just imports the module, two drive it through the Click entrypoint — so it is split into a unit test (import only) and an e2e test (CliRunner invocations), sharing the block_pandas_and_pywr fixture via a new tests/conftest.py. Rename tests/unit/test_cli_lazy_import.py to test_cli_module_import_without_deps.py: pytest's rootless import mode requires unique basenames across the whole tests/ tree, and the e2e file of the same name already exists.
Mearman
force-pushed
the
test/unit-integration-e2e-coverage-60
branch
from
August 12, 2026 10:10
097b4af to
7671735
Compare
Mearman
enabled auto-merge (rebase)
September 16, 2026 13:49
This was referenced Sep 17, 2026
auto-merge was automatically disabled
September 17, 2026 02:59
Pull request was closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
unit,integration,e2emarkers inpyproject.tomland setspytestmarkat module level in every test file, so type is enforceable both by directory and by-mmarker selection.test_cli_lazy_import.py, into the split layout. Under the CliRunner-vs-plain-import line, it actually mixed types (one test just imports the module, two drive it through the Click entrypoint), so it's split into a unit test and an e2e test sharing theblock_pandas_and_pywrfixture via a newtests/conftest.py.test_cli_module_import_without_deps.py, since pytest's rootless import mode needs unique basenames across the wholetests/tree.Test plan
pytest -q— 72 passed, 1 xfailed, coverage 99.23% (floor is 97%)pytest tests/unit,pytest tests/integration,pytest tests/e2eeach collect and pass independently (27/27/18)pytest -m unit,-m integration,-m e2ereturn the same sets as the directoriesmypy pywr_utils/clean