We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a52f791 commit bcd589bCopy full SHA for bcd589b
testing/code/test_excinfo.py
@@ -775,14 +775,20 @@ def entry():
775
)
776
excinfo = pytest.raises(ValueError, mod.entry)
777
778
- p = FormattedExcinfo()
+ p = FormattedExcinfo(abspath=False)
779
+
780
+ raised = 0
781
782
def raiseos():
- raise OSError(2)
783
+ nonlocal raised
784
+ raised += 1
785
+ raise OSError(2, "custom_oserror")
786
787
monkeypatch.setattr(os, "getcwd", raiseos)
788
assert p._makepath(__file__) == __file__
789
+ assert raised == 1
790
p.repr_traceback(excinfo)
791
+ assert raised >= 3 # typically 3, 5 on py38-windows
792
793
def test_repr_excinfo_addouterr(self, importasmod, tw_mock):
794
mod = importasmod(
0 commit comments