(self)
| 284 | self.assertTrue(repr_str.startswith("list[["), repr_str) |
| 285 | |
| 286 | def test_evil_repr3(self): |
| 287 | # gh-143823 |
| 288 | lst = [] |
| 289 | class X: |
| 290 | def __repr__(self): |
| 291 | lst.clear() |
| 292 | return "x" |
| 293 | |
| 294 | lst += [X(), 1] |
| 295 | ga = GenericAlias(int, lst) |
| 296 | with self.assertRaises(IndexError): |
| 297 | repr(ga) |
| 298 | |
| 299 | def test_exposed_type(self): |
| 300 | import types |
nothing calls this directly
no test coverage detected