MCPcopy
hub / github.com/Textualize/rich / test_traceback_finely_grained_missing

Function test_traceback_finely_grained_missing

tests/test_traceback.py:335–342  ·  view source on GitHub ↗

Before 3.11, the last_instruction should be None

()

Source from the content-addressed store, hash-verified

333 sys.version_info.minor >= 11, reason="Not applicable after Python 3.11"
334)
335def test_traceback_finely_grained_missing() -> None:
336 """Before 3.11, the last_instruction should be None"""
337 try:
338 1 / 0
339 except:
340 traceback = Traceback()
341 last_instruction = traceback.trace.stacks[-1].frames[-1].last_instruction
342 assert last_instruction is None
343
344
345@pytest.mark.skipif(

Callers

nothing calls this directly

Calls 1

TracebackClass · 0.90

Tested by

no test coverage detected