(self)
| 338 | check(OrderedDict(od)) |
| 339 | |
| 340 | def test_yaml_linkage(self): |
| 341 | OrderedDict = self.OrderedDict |
| 342 | # Verify that __reduce__ is setup in a way that supports PyYAML's dump() feature. |
| 343 | # In yaml, lists are native but tuples are not. |
| 344 | pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] |
| 345 | od = OrderedDict(pairs) |
| 346 | # yaml.dump(od) --> |
| 347 | # '!!python/object/apply:__main__.OrderedDict\n- - [a, 1]\n - [b, 2]\n' |
| 348 | self.assertTrue(all(type(pair)==list for pair in od.__reduce__()[1])) |
| 349 | |
| 350 | def test_reduce_not_too_fat(self): |
| 351 | OrderedDict = self.OrderedDict |
nothing calls this directly
no test coverage detected