(self)
| 388 | "OrderedDict({'a': None, 'b': None, 'c': None, 'x': ...})") |
| 389 | |
| 390 | def test_repr_recursive_values(self): |
| 391 | OrderedDict = self.OrderedDict |
| 392 | od = OrderedDict() |
| 393 | od[42] = od.values() |
| 394 | r = repr(od) |
| 395 | # Cannot perform a stronger test, as the contents of the repr |
| 396 | # are implementation-dependent. All we can say is that we |
| 397 | # want a str result, not an exception of any sort. |
| 398 | self.assertIsInstance(r, str) |
| 399 | od[42] = od.items() |
| 400 | r = repr(od) |
| 401 | # Again. |
| 402 | self.assertIsInstance(r, str) |
| 403 | |
| 404 | def test_setdefault(self): |
| 405 | OrderedDict = self.OrderedDict |
nothing calls this directly
no test coverage detected