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

Function test_notes

tests/test_traceback.py:366–375  ·  view source on GitHub ↗

Check traceback captures __note__.

()

Source from the content-addressed store, hash-verified

364 sys.version_info.minor < 11, reason="Not supported before Python 3.11"
365)
366def test_notes() -> None:
367 """Check traceback captures __note__."""
368 try:
369 1 / 0
370 except Exception as error:
371 error.add_note("Hello")
372 error.add_note("World")
373 traceback = Traceback()
374
375 assert traceback.trace.stacks[0].notes == ["Hello", "World"]
376
377
378def test_recursive_exception() -> None:

Callers

nothing calls this directly

Calls 1

TracebackClass · 0.90

Tested by

no test coverage detected