From 401c3d11097225e0081b41cfe5816e398812ba0c Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 23 Jul 2019 19:35:51 +0200 Subject: [PATCH 1/2] tests: unittest: fix/harden "test_exit_outcome" Ref: https://github.com/pytest-dev/pytest/pull/5634#pullrequestreview-265565917 --- testing/test_unittest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_unittest.py b/testing/test_unittest.py index 153b76a89..ec5f92e18 100644 --- a/testing/test_unittest.py +++ b/testing/test_unittest.py @@ -1085,4 +1085,4 @@ def test_exit_outcome(testdir): """ ) result = testdir.runpytest() - result.stdout.fnmatch_lines("*Exit: pytest_exit called*") + result.stdout.fnmatch_lines(["*Exit: pytest_exit called*", "*= no tests ran in *"]) From b9111fe677fc1ae6756b3dddc7ed4a40b544dfa4 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 23 Jul 2019 19:38:33 +0200 Subject: [PATCH 2/2] Fix changelog --- changelog/5634.bugfix.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/5634.bugfix.rst b/changelog/5634.bugfix.rst index f4699919b..a2a282f93 100644 --- a/changelog/5634.bugfix.rst +++ b/changelog/5634.bugfix.rst @@ -1 +1,2 @@ -``pytest.exit`` and ``bdb.BdbQuit`` are now correctly handled in ``unittest`` cases. +``pytest.exit`` is now correctly handled in ``unittest`` cases. +This makes ``unittest`` cases handle ``quit`` from pytest's pdb correctly.