(self)
| 585 | self.assertEqual(dotted_printer.pformat(o2), exp2) |
| 586 | |
| 587 | def test_set_reprs(self): |
| 588 | self.assertEqual(pprint.pformat(set()), 'set()') |
| 589 | self.assertEqual(pprint.pformat(set(range(3))), '{0, 1, 2}') |
| 590 | self.assertEqual(pprint.pformat(set(range(7)), width=20), '''\ |
| 591 | {0, |
| 592 | 1, |
| 593 | 2, |
| 594 | 3, |
| 595 | 4, |
| 596 | 5, |
| 597 | 6}''') |
| 598 | self.assertEqual(pprint.pformat(set2(range(7)), width=20), '''\ |
| 599 | set2({0, |
| 600 | 1, |
| 601 | 2, |
| 602 | 3, |
| 603 | 4, |
| 604 | 5, |
| 605 | 6})''') |
| 606 | self.assertEqual(pprint.pformat(set3(range(7)), width=20), |
| 607 | 'set3({0, 1, 2, 3, 4, 5, 6})') |
| 608 | |
| 609 | self.assertEqual(pprint.pformat(frozenset()), 'frozenset()') |
| 610 | self.assertEqual(pprint.pformat(frozenset(range(3))), |
| 611 | 'frozenset({0, 1, 2})') |
| 612 | self.assertEqual(pprint.pformat(frozenset(range(7)), width=20), '''\ |
| 613 | frozenset({0, |
| 614 | 1, |
| 615 | 2, |
| 616 | 3, |
| 617 | 4, |
| 618 | 5, |
| 619 | 6})''') |
| 620 | self.assertEqual(pprint.pformat(frozenset2(range(7)), width=20), '''\ |
| 621 | frozenset2({0, |
| 622 | 1, |
| 623 | 2, |
| 624 | 3, |
| 625 | 4, |
| 626 | 5, |
| 627 | 6})''') |
| 628 | self.assertEqual(pprint.pformat(frozenset3(range(7)), width=20), |
| 629 | 'frozenset3({0, 1, 2, 3, 4, 5, 6})') |
| 630 | |
| 631 | def test_set_of_sets_reprs(self): |
| 632 | # This test creates a complex arrangement of frozensets and |
nothing calls this directly
no test coverage detected