Derive outcomes.exit.Exception from SystemExit instead of KeyboardInterrupt
This is required for properly getting out of pdb, where KeyboardInterrupt is caught in py36 at least. Ref: https://github.com/pytest-dev/pytest/issues/1865#issuecomment-242599949
This commit is contained in:
@@ -553,7 +553,7 @@ def test_outcomeexception_passes_except_Exception():
|
||||
def test_pytest_exit():
|
||||
with pytest.raises(pytest.exit.Exception) as excinfo:
|
||||
pytest.exit("hello")
|
||||
assert excinfo.errisinstance(KeyboardInterrupt)
|
||||
assert excinfo.errisinstance(pytest.exit.Exception)
|
||||
|
||||
|
||||
def test_pytest_fail():
|
||||
|
||||
Reference in New Issue
Block a user