Fix exception causes all over the codebase
This commit is contained in:
@@ -1778,5 +1778,5 @@ def test_conftest_import_error_repr(tmpdir):
|
||||
):
|
||||
try:
|
||||
raise RuntimeError("some error")
|
||||
except Exception:
|
||||
raise ConftestImportFailure(path, sys.exc_info())
|
||||
except Exception as e:
|
||||
raise ConftestImportFailure(path, sys.exc_info()) from e
|
||||
|
||||
@@ -534,8 +534,8 @@ def test_outcomeexception_passes_except_Exception() -> None:
|
||||
with pytest.raises(outcomes.OutcomeException):
|
||||
try:
|
||||
raise outcomes.OutcomeException("test")
|
||||
except Exception:
|
||||
raise NotImplementedError()
|
||||
except Exception as e:
|
||||
raise NotImplementedError from e
|
||||
|
||||
|
||||
def test_pytest_exit() -> None:
|
||||
|
||||
Reference in New Issue
Block a user