(self)
| 634 | self.assertEqual(aRepr.repr(sys.stdin), "<stdin>") |
| 635 | |
| 636 | def test_custom_repr_class_with_spaces(self): |
| 637 | class TypeWithSpaces: |
| 638 | pass |
| 639 | |
| 640 | t = TypeWithSpaces() |
| 641 | type(t).__name__ = "type with spaces" |
| 642 | self.assertEqual(type(t).__name__, "type with spaces") |
| 643 | |
| 644 | class MyRepr(Repr): |
| 645 | def repr_type_with_spaces(self, obj, level): |
| 646 | return "Type With Spaces" |
| 647 | |
| 648 | |
| 649 | aRepr = MyRepr() |
| 650 | self.assertEqual(aRepr.repr(t), "Type With Spaces") |
| 651 | |
| 652 | def write_file(path, text): |
| 653 | with open(path, 'w', encoding='ASCII') as fp: |
nothing calls this directly
no test coverage detected