Skip to content

Commit 880e368

Browse files
authored
Merge pull request #5653 from blueyed/fix-test
Followup: unittest: handle outcomes.Exit
2 parents 2a724a1 + b9111fe commit 880e368

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

changelog/5634.bugfix.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
``pytest.exit`` and ``bdb.BdbQuit`` are now correctly handled in ``unittest`` cases.
1+
``pytest.exit`` is now correctly handled in ``unittest`` cases.
2+
This makes ``unittest`` cases handle ``quit`` from pytest's pdb correctly.

testing/test_unittest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,4 +1085,4 @@ def test_should_not_run(self):
10851085
"""
10861086
)
10871087
result = testdir.runpytest()
1088-
result.stdout.fnmatch_lines("*Exit: pytest_exit called*")
1088+
result.stdout.fnmatch_lines(["*Exit: pytest_exit called*", "*= no tests ran in *"])

0 commit comments

Comments
 (0)