(self)
| 870 | self.assertEqual(dotted_printer.pformat(o2), exp2) |
| 871 | |
| 872 | def test_set_reprs(self): |
| 873 | self.assertEqual(pprint.pformat(set()), 'set()') |
| 874 | self.assertEqual(pprint.pformat(set(range(3))), '{0, 1, 2}') |
| 875 | self.assertEqual(pprint.pformat(set(range(7)), width=20), '''\ |
| 876 | {0, |
| 877 | 1, |
| 878 | 2, |
| 879 | 3, |
| 880 | 4, |
| 881 | 5, |
| 882 | 6}''') |
| 883 | self.assertEqual(pprint.pformat(set2(range(7)), width=20), '''\ |
| 884 | set2({0, |
| 885 | 1, |
| 886 | 2, |
| 887 | 3, |
| 888 | 4, |
| 889 | 5, |
| 890 | 6})''') |
| 891 | self.assertEqual(pprint.pformat(set3(range(7)), width=20), |
| 892 | 'set3({0, 1, 2, 3, 4, 5, 6})') |
| 893 | |
| 894 | self.assertEqual(pprint.pformat(frozenset()), 'frozenset()') |
| 895 | self.assertEqual(pprint.pformat(frozenset(range(3))), |
| 896 | 'frozenset({0, 1, 2})') |
| 897 | self.assertEqual(pprint.pformat(frozenset(range(7)), width=20), '''\ |
| 898 | frozenset({0, |
| 899 | 1, |
| 900 | 2, |
| 901 | 3, |
| 902 | 4, |
| 903 | 5, |
| 904 | 6})''') |
| 905 | self.assertEqual(pprint.pformat(frozenset2(range(7)), width=20), '''\ |
| 906 | frozenset2({0, |
| 907 | 1, |
| 908 | 2, |
| 909 | 3, |
| 910 | 4, |
| 911 | 5, |
| 912 | 6})''') |
| 913 | self.assertEqual(pprint.pformat(frozenset3(range(7)), width=20), |
| 914 | 'frozenset3({0, 1, 2, 3, 4, 5, 6})') |
| 915 | |
| 916 | def test_set_of_sets_reprs(self): |
| 917 | # This test creates a complex arrangement of frozensets and |
nothing calls this directly
no test coverage detected