diff options
author | Barry Warsaw <barry@python.org> | 2001-11-28 05:49:39 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2001-11-28 05:49:39 (GMT) |
commit | 00859c053857437b635ba9e813f46e884f3aecb4 (patch) | |
tree | 4bd98eb16c43df18f02fa081756d652001565219 /Lib/test | |
parent | 3072ecdcd28975fa289b5a4b1799b3bf69fefdf2 (diff) | |
download | cpython-00859c053857437b635ba9e813f46e884f3aecb4.zip cpython-00859c053857437b635ba9e813f46e884f3aecb4.tar.gz cpython-00859c053857437b635ba9e813f46e884f3aecb4.tar.bz2 |
__format(): Applied SF patch #482003 by Skip to fix multiline dict
output.
Patch includes additional test case test_basic_line_wrap().
This patch is a candidate for Python 2.1.2.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_pprint.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py index 167b4ac..14626fb 100644 --- a/Lib/test/test_pprint.py +++ b/Lib/test/test_pprint.py @@ -77,6 +77,25 @@ class QueryTestCase(unittest.TestCase): (native, got, function)) + def test_basic_line_wrap(self): + """verify basic line-wrapping operation""" + o = {'RPM_cal': 0, + 'RPM_cal2': 48059, + 'Speed_cal': 0, + 'controldesk_runtime_us': 0, + 'main_code_runtime_us': 0, + 'read_io_runtime_us': 0, + 'write_io_runtime_us': 43690} + exp = """\ +{'RPM_cal': 0, + 'RPM_cal2': 48059, + 'Speed_cal': 0, + 'controldesk_runtime_us': 0, + 'main_code_runtime_us': 0, + 'read_io_runtime_us': 0, + 'write_io_runtime_us': 43690}""" + self.assertEqual(pprint.pformat(o), exp) + def test_main(): test_support.run_unittest(QueryTestCase) |