Check traceback captures __note__.
()
| 364 | sys.version_info.minor < 11, reason="Not supported before Python 3.11" |
| 365 | ) |
| 366 | def 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 | |
| 378 | def test_recursive_exception() -> None: |