(self)
| 532 | assert repr.chain[0][0].reprentries[0].lines[0] == "> ???" |
| 533 | |
| 534 | def test_repr_local(self) -> None: |
| 535 | p = FormattedExcinfo(showlocals=True) |
| 536 | loc = {"y": 5, "z": 7, "x": 3, "@x": 2, "__builtins__": {}} |
| 537 | reprlocals = p.repr_locals(loc) |
| 538 | assert reprlocals is not None |
| 539 | assert reprlocals.lines |
| 540 | assert reprlocals.lines[0] == "__builtins__ = <builtins>" |
| 541 | assert reprlocals.lines[1] == "x = 3" |
| 542 | assert reprlocals.lines[2] == "y = 5" |
| 543 | assert reprlocals.lines[3] == "z = 7" |
| 544 | |
| 545 | def test_repr_local_with_error(self) -> None: |
| 546 | class ObjWithErrorInRepr: |
nothing calls this directly
no test coverage detected