forward args to subprocess by default, block explicit unsupported list - #49
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates pytest-isolated’s subprocess CLI-argument handling to a forward-by-default (blacklist) model, adds early validation for explicitly incompatible options when isolation is active, and documents the option-compatibility behavior with expanded test coverage.
Changes:
- Switch argument forwarding to a blacklist approach so custom/third-party options are forwarded by default.
- Add early validation to raise
UsageErrorwhen isolation is active alongside explicitly incompatible options (including viaPYTEST_ADDOPTS). - Add tests + documentation for option compatibility/forwarding behavior (including
PYTEST_ADDOPTS,-p,--setup-show, and--import-mode).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_options.py | Adds integration tests for forwarding behavior, env var propagation, and several option compatibility scenarios. |
| tests/test_execution_units.py | Updates unit expectations for _build_forwarded_args to match forward-by-default behavior. |
| src/pytest_isolated/grouping.py | Adds early incompatible-option validation when isolation will be used. |
| src/pytest_isolated/execution.py | Reworks _build_forwarded_args for blacklist forwarding and adds --setup-show output re-emission. |
| src/pytest_isolated/config.py | Introduces _INCOMPATIBLE_OPTIONS and _validate_isolation_compatibility. |
| README.md | Documents the new compatibility model and links to a reference page. |
| docs/incompatible-options.md | New reference documentation describing blocked/parent-handled/forwarded options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dyollb
force-pushed
the
forward_if_not_blacklisted
branch
from
June 15, 2026 07:53
92955c3 to
d8df6ec
Compare
pcrespov
approved these changes
Jun 15, 2026
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.
MR Summary
Switched pytest-isolated to a blacklist model for CLI forwarding: options are now forwarded to child subprocesses by default, and only a small explicit set of truly incompatible options is blocked. This improves plugin and custom-option compatibility.
What changed
in incompatible-options.md, plus a high-level note in README.md.
Related
--setup-showflag doesn't display fixture information for@pytest.mark.isolatedtests #47@pytest.mark.isolatedtests #48