-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
Collection error incorrectly deleted unstable tests completely, so they were not executed on next runs at all.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1270,6 +1270,49 @@ def test_2(): | |
) | ||
|
||
|
||
class TestPytestCollectionPhase: | ||
def test_sync_after_collectionerror(self, testdir): | ||
testdir.makepyfile( | ||
test_a=""" | ||
def test_0(): | ||
pass | ||
def test_2(): | ||
pass | ||
""" | ||
) | ||
testdir.runpytest_inprocess( | ||
"--testmon", | ||
) | ||
testdir.makepyfile( | ||
test_a=""" | ||
def test_0(): | ||
pass | ||
def test_2(): | ||
try: | ||
""" | ||
) | ||
testdir.runpytest_inprocess( | ||
"--testmon", | ||
) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tarpas
Author
Owner
|
||
testdir.makepyfile( | ||
test_a=""" | ||
def test_0(): | ||
pass | ||
def test_2(): | ||
print(1) | ||
""" | ||
) | ||
result = testdir.runpytest_inprocess("--testmon", "-v") | ||
result.stdout.fnmatch_lines( | ||
[ | ||
"*test_2 PASSED*", | ||
] | ||
) | ||
|
||
|
||
class TestmonCollect: | ||
def test_failed_setup_phase(self, testdir): | ||
testdir.makepyfile( | ||
|
Would be good to have some basic assertion on the result, i.e. that it really triggered a collection error.