(self)
| 663 | ValuesView.__name__ + joined_items) |
| 664 | |
| 665 | def test_nested_views(self): |
| 666 | d = {1: MappingView({1: MappingView({1: MappingView({1: 2})})})} |
| 667 | self.assertEqual(repr(d), |
| 668 | "{1: MappingView({1: MappingView({1: MappingView({1: 2})})})}") |
| 669 | self.assertEqual(pprint.pformat(d), |
| 670 | "{1: MappingView({1: MappingView({1: MappingView({1: 2})})})}") |
| 671 | self.assertEqual(pprint.pformat(d, depth=2), |
| 672 | "{1: MappingView({1: {...}})}") |
| 673 | d = {} |
| 674 | d1 = {1: d.values()} |
| 675 | d2 = {1: d1.values()} |
| 676 | d3 = {1: d2.values()} |
| 677 | self.assertEqual(pprint.pformat(d3), |
| 678 | "{1: dict_values([dict_values([dict_values([])])])}") |
| 679 | self.assertEqual(pprint.pformat(d3, depth=2), |
| 680 | "{1: dict_values([{...}])}") |
| 681 | |
| 682 | def test_unorderable_items_views(self): |
| 683 | """Check that views with unorderable items have stable sorting.""" |
nothing calls this directly
no test coverage detected