(self)
| 434 | self.assertEqual(pprint.pformat(type(o), indent=4), exp) |
| 435 | |
| 436 | def test_nested_indentations(self): |
| 437 | o1 = list(range(10)) |
| 438 | o2 = dict(first=1, second=2, third=3) |
| 439 | o = [o1, o2] |
| 440 | expected = """\ |
| 441 | [ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], |
| 442 | {'first': 1, 'second': 2, 'third': 3}]""" |
| 443 | self.assertEqual(pprint.pformat(o, indent=4, width=42), expected) |
| 444 | expected = """\ |
| 445 | [ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], |
| 446 | { 'first': 1, |
| 447 | 'second': 2, |
| 448 | 'third': 3}]""" |
| 449 | self.assertEqual(pprint.pformat(o, indent=4, width=41), expected) |
| 450 | |
| 451 | def test_width(self): |
| 452 | expected = """\ |
nothing calls this directly
no test coverage detected