(self)
| 302 | assert excinfo.traceback.recursionindex() is None |
| 303 | |
| 304 | def test_getreprcrash(self): |
| 305 | def i(): |
| 306 | __tracebackhide__ = True |
| 307 | raise ValueError |
| 308 | |
| 309 | def h(): |
| 310 | i() |
| 311 | |
| 312 | def g(): |
| 313 | __tracebackhide__ = True |
| 314 | h() |
| 315 | |
| 316 | def f(): |
| 317 | g() |
| 318 | |
| 319 | with pytest.raises(ValueError) as excinfo: |
| 320 | f() |
| 321 | reprcrash = excinfo._getreprcrash() |
| 322 | assert reprcrash is not None |
| 323 | co = _pytest._code.Code.from_function(h) |
| 324 | assert reprcrash.path == str(co.path) |
| 325 | assert reprcrash.lineno == co.firstlineno + 1 + 1 |
| 326 | |
| 327 | def test_getreprcrash_empty(self): |
| 328 | __tracebackhide__ = True |
nothing calls this directly
no test coverage detected