diff options
Diffstat (limited to 'Lib/test/test_pprint.py')
-rw-r--r-- | Lib/test/test_pprint.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py index d66b78a..a61bb66 100644 --- a/Lib/test/test_pprint.py +++ b/Lib/test/test_pprint.py @@ -154,6 +154,12 @@ class QueryTestCase(unittest.TestCase): for type in [tuple, tuple2]: self.assertEqual(pprint.pformat(type(o)), exp) + # indent parameter + o = range(100) + exp = '[ %s]' % ',\n '.join(map(str, o)) + for type in [list, list2]: + self.assertEqual(pprint.pformat(type(o), indent=4), exp) + def test_subclassing(self): o = {'names with spaces': 'should be presented using repr()', 'others.should.not.be': 'like.this'} |