()
| 128 | |
| 129 | |
| 130 | def test_buggy_builtin_repr(): |
| 131 | # Simulate a case where a repr for a builtin raises. |
| 132 | # reprlib dispatches by type name, so use "int". |
| 133 | |
| 134 | class int: |
| 135 | def __repr__(self): |
| 136 | raise ValueError("Buggy repr!") |
| 137 | |
| 138 | assert "Buggy" in saferepr(int()) |
| 139 | |
| 140 | |
| 141 | def test_big_repr(): |