(self)
| 704 | assert repr.chain[0][0].reprentries[0].lines[0] == "> ???" |
| 705 | |
| 706 | def test_repr_local(self) -> None: |
| 707 | p = ExceptionInfoFormatter(showlocals=True) |
| 708 | loc = {"y": 5, "z": 7, "x": 3, "@x": 2, "__builtins__": {}} |
| 709 | reprlocals = p.repr_locals(loc) |
| 710 | assert reprlocals is not None |
| 711 | assert reprlocals.lines |
| 712 | assert reprlocals.lines[0] == "__builtins__ = <builtins>" |
| 713 | assert reprlocals.lines[1] == "x = 3" |
| 714 | assert reprlocals.lines[2] == "y = 5" |
| 715 | assert reprlocals.lines[3] == "z = 7" |
| 716 | |
| 717 | def test_repr_local_with_error(self) -> None: |
| 718 | class ObjWithErrorInRepr: |
nothing calls this directly
no test coverage detected