fix test that was assuming wrong return value for getcrashentry

* The test still assumed that Traceback.getcrashentry would return the last element from the traceback when all elements were hidden. However, that was erroneous behavior which was fixed in a583c68e15
This commit is contained in:
Felix Hofstätter 2023-03-11 11:39:02 +01:00
parent a583c68e15
commit 377ef7feb2
1 changed files with 1 additions and 4 deletions

View File

@ -311,10 +311,7 @@ class TestTraceback_f_g_h:
excinfo = pytest.raises(ValueError, f)
tb = excinfo.traceback
entry = tb.getcrashentry()
co = _pytest._code.Code.from_function(g)
assert entry.frame.code.path == co.path
assert entry.lineno == co.firstlineno + 2
assert entry.frame.code.name == "g"
assert entry is None
def test_excinfo_exconly():