forked from pytest-dev/pytest-forked
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minimised repro case for pytest-dev#67
- Loading branch information
Showing
3 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""Minimal repro case for https://github.com/pytest-dev/pytest-forked/issues/67. | ||
See also: `test_issue67_z.py`""" | ||
|
||
import pytest | ||
|
||
|
||
def test_asetup_for_failure(): | ||
"Non-forked test to get current module onto SetupState" | ||
pass | ||
|
||
|
||
@pytest.mark.forked | ||
def test_yyy(): | ||
""" | ||
Forked test as last test in the module. | ||
This way, teardown phase of previous test does not remove `test_issue67_a` module | ||
from the stack, and forked setups/teardowns do not leave the containment of the forked | ||
process. | ||
""" | ||
pass | ||
|
||
|
||
# Uncomment me to make tests pass O_- | ||
# def test_zcleanup(): | ||
# """As long as the last teardown of the module is ran in-process, stack should | ||
# stay valid for next module""" | ||
# pass |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"Second part of pytest>=7 incompatibility repro case. See also: `test_issue67_a.py`" | ||
|
||
|
||
def test_no_forky(): | ||
"""When ran after `test_issue67_a.py`, this test will explode because | ||
`test_issue67_a` module is still on stack""" | ||
pass |
This file contains 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