summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-01-31 01:10:03 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-01-31 01:10:03 (GMT)
commit4b8db419c278215ac1c79f4aac2b1453b13e8c83 (patch)
tree46b9ef850ed56c6ea6dae90de74947f965360b58 /Lib/test
parentdb96789ba7dd79438ca01d21d5f62a3adda2ffeb (diff)
downloadcpython-4b8db419c278215ac1c79f4aac2b1453b13e8c83.zip
cpython-4b8db419c278215ac1c79f4aac2b1453b13e8c83.tar.gz
cpython-4b8db419c278215ac1c79f4aac2b1453b13e8c83.tar.bz2
Update pprint() to match the new repr style for frozensets
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_pprint.py316
1 files changed, 158 insertions, 158 deletions
diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py
index 8d75d58..a0cd01a 100644
--- a/Lib/test/test_pprint.py
+++ b/Lib/test/test_pprint.py
@@ -197,186 +197,186 @@ class QueryTestCase(unittest.TestCase):
self.assertEqual(pprint.pformat(frozenset(range(3))), 'frozenset({0, 1, 2})')
cube_repr_tgt = """\
{frozenset(): frozenset({frozenset({2}), frozenset({0}), frozenset({1})}),
- frozenset({0}): frozenset([frozenset(),
+ frozenset({0}): frozenset({frozenset(),
frozenset({0, 2}),
- frozenset({0, 1})]),
- frozenset({1}): frozenset([frozenset(),
+ frozenset({0, 1})}),
+ frozenset({1}): frozenset({frozenset(),
frozenset({1, 2}),
- frozenset({0, 1})]),
- frozenset({2}): frozenset([frozenset(),
+ frozenset({0, 1})}),
+ frozenset({2}): frozenset({frozenset(),
frozenset({1, 2}),
- frozenset({0, 2})]),
- frozenset({1, 2}): frozenset([frozenset({2}),
+ frozenset({0, 2})}),
+ frozenset({1, 2}): frozenset({frozenset({2}),
frozenset({1}),
- frozenset({0, 1, 2})]),
- frozenset({0, 2}): frozenset([frozenset({2}),
+ frozenset({0, 1, 2})}),
+ frozenset({0, 2}): frozenset({frozenset({2}),
frozenset({0}),
- frozenset({0, 1, 2})]),
- frozenset({0, 1}): frozenset([frozenset({0}),
+ frozenset({0, 1, 2})}),
+ frozenset({0, 1}): frozenset({frozenset({0}),
frozenset({1}),
- frozenset({0, 1, 2})]),
- frozenset({0, 1, 2}): frozenset([frozenset({1, 2}),
+ frozenset({0, 1, 2})}),
+ frozenset({0, 1, 2}): frozenset({frozenset({1, 2}),
frozenset({0, 2}),
- frozenset({0, 1})])}"""
+ frozenset({0, 1})})}"""
cube = test.test_set.cube(3)
self.assertEqual(pprint.pformat(cube), cube_repr_tgt)
cubo_repr_tgt = """\
-{frozenset({frozenset({0, 2}), frozenset({0})}): frozenset([frozenset([frozenset([0,
- 2]),
- frozenset([0,
+{frozenset({frozenset({0, 2}), frozenset({0})}): frozenset({frozenset({frozenset({0,
+ 2}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([0]),
- frozenset([0,
- 1])]),
- frozenset([frozenset(),
- frozenset([0])]),
- frozenset([frozenset([2]),
- frozenset([0,
- 2])])]),
- frozenset({frozenset({0, 1}), frozenset({1})}): frozenset([frozenset([frozenset([0,
- 1]),
- frozenset([0,
+ 2})}),
+ frozenset({frozenset({0}),
+ frozenset({0,
+ 1})}),
+ frozenset({frozenset(),
+ frozenset({0})}),
+ frozenset({frozenset({2}),
+ frozenset({0,
+ 2})})}),
+ frozenset({frozenset({0, 1}), frozenset({1})}): frozenset({frozenset({frozenset({0,
+ 1}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([0]),
- frozenset([0,
- 1])]),
- frozenset([frozenset([1]),
- frozenset([1,
- 2])]),
- frozenset([frozenset(),
- frozenset([1])])]),
- frozenset({frozenset({1, 2}), frozenset({1})}): frozenset([frozenset([frozenset([1,
- 2]),
- frozenset([0,
+ 2})}),
+ frozenset({frozenset({0}),
+ frozenset({0,
+ 1})}),
+ frozenset({frozenset({1}),
+ frozenset({1,
+ 2})}),
+ frozenset({frozenset(),
+ frozenset({1})})}),
+ frozenset({frozenset({1, 2}), frozenset({1})}): frozenset({frozenset({frozenset({1,
+ 2}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([2]),
- frozenset([1,
- 2])]),
- frozenset([frozenset(),
- frozenset([1])]),
- frozenset([frozenset([1]),
- frozenset([0,
- 1])])]),
- frozenset({frozenset({1, 2}), frozenset({2})}): frozenset([frozenset([frozenset([1,
- 2]),
- frozenset([0,
+ 2})}),
+ frozenset({frozenset({2}),
+ frozenset({1,
+ 2})}),
+ frozenset({frozenset(),
+ frozenset({1})}),
+ frozenset({frozenset({1}),
+ frozenset({0,
+ 1})})}),
+ frozenset({frozenset({1, 2}), frozenset({2})}): frozenset({frozenset({frozenset({1,
+ 2}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([1]),
- frozenset([1,
- 2])]),
- frozenset([frozenset([2]),
- frozenset([0,
- 2])]),
- frozenset([frozenset(),
- frozenset([2])])]),
- frozenset({frozenset(), frozenset({0})}): frozenset([frozenset([frozenset([0]),
- frozenset([0,
- 1])]),
- frozenset([frozenset([0]),
- frozenset([0,
- 2])]),
- frozenset([frozenset(),
- frozenset([1])]),
- frozenset([frozenset(),
- frozenset([2])])]),
- frozenset({frozenset(), frozenset({1})}): frozenset([frozenset([frozenset(),
- frozenset([0])]),
- frozenset([frozenset([1]),
- frozenset([1,
- 2])]),
- frozenset([frozenset(),
- frozenset([2])]),
- frozenset([frozenset([1]),
- frozenset([0,
- 1])])]),
- frozenset({frozenset({2}), frozenset()}): frozenset([frozenset([frozenset([2]),
- frozenset([1,
- 2])]),
- frozenset([frozenset(),
- frozenset([0])]),
- frozenset([frozenset(),
- frozenset([1])]),
- frozenset([frozenset([2]),
- frozenset([0,
- 2])])]),
- frozenset({frozenset({0, 1, 2}), frozenset({0, 1})}): frozenset([frozenset([frozenset([1,
- 2]),
- frozenset([0,
+ 2})}),
+ frozenset({frozenset({1}),
+ frozenset({1,
+ 2})}),
+ frozenset({frozenset({2}),
+ frozenset({0,
+ 2})}),
+ frozenset({frozenset(),
+ frozenset({2})})}),
+ frozenset({frozenset(), frozenset({0})}): frozenset({frozenset({frozenset({0}),
+ frozenset({0,
+ 1})}),
+ frozenset({frozenset({0}),
+ frozenset({0,
+ 2})}),
+ frozenset({frozenset(),
+ frozenset({1})}),
+ frozenset({frozenset(),
+ frozenset({2})})}),
+ frozenset({frozenset(), frozenset({1})}): frozenset({frozenset({frozenset(),
+ frozenset({0})}),
+ frozenset({frozenset({1}),
+ frozenset({1,
+ 2})}),
+ frozenset({frozenset(),
+ frozenset({2})}),
+ frozenset({frozenset({1}),
+ frozenset({0,
+ 1})})}),
+ frozenset({frozenset({2}), frozenset()}): frozenset({frozenset({frozenset({2}),
+ frozenset({1,
+ 2})}),
+ frozenset({frozenset(),
+ frozenset({0})}),
+ frozenset({frozenset(),
+ frozenset({1})}),
+ frozenset({frozenset({2}),
+ frozenset({0,
+ 2})})}),
+ frozenset({frozenset({0, 1, 2}), frozenset({0, 1})}): frozenset({frozenset({frozenset({1,
+ 2}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([0,
- 2]),
- frozenset([0,
+ 2})}),
+ frozenset({frozenset({0,
+ 2}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([0]),
- frozenset([0,
- 1])]),
- frozenset([frozenset([1]),
- frozenset([0,
- 1])])]),
- frozenset({frozenset({0}), frozenset({0, 1})}): frozenset([frozenset([frozenset(),
- frozenset([0])]),
- frozenset([frozenset([0,
- 1]),
- frozenset([0,
+ 2})}),
+ frozenset({frozenset({0}),
+ frozenset({0,
+ 1})}),
+ frozenset({frozenset({1}),
+ frozenset({0,
+ 1})})}),
+ frozenset({frozenset({0}), frozenset({0, 1})}): frozenset({frozenset({frozenset(),
+ frozenset({0})}),
+ frozenset({frozenset({0,
+ 1}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([0]),
- frozenset([0,
- 2])]),
- frozenset([frozenset([1]),
- frozenset([0,
- 1])])]),
- frozenset({frozenset({2}), frozenset({0, 2})}): frozenset([frozenset([frozenset([0,
- 2]),
- frozenset([0,
+ 2})}),
+ frozenset({frozenset({0}),
+ frozenset({0,
+ 2})}),
+ frozenset({frozenset({1}),
+ frozenset({0,
+ 1})})}),
+ frozenset({frozenset({2}), frozenset({0, 2})}): frozenset({frozenset({frozenset({0,
+ 2}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([2]),
- frozenset([1,
- 2])]),
- frozenset([frozenset([0]),
- frozenset([0,
- 2])]),
- frozenset([frozenset(),
- frozenset([2])])]),
- frozenset({frozenset({0, 1, 2}), frozenset({0, 2})}): frozenset([frozenset([frozenset([1,
- 2]),
- frozenset([0,
+ 2})}),
+ frozenset({frozenset({2}),
+ frozenset({1,
+ 2})}),
+ frozenset({frozenset({0}),
+ frozenset({0,
+ 2})}),
+ frozenset({frozenset(),
+ frozenset({2})})}),
+ frozenset({frozenset({0, 1, 2}), frozenset({0, 2})}): frozenset({frozenset({frozenset({1,
+ 2}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([0,
- 1]),
- frozenset([0,
+ 2})}),
+ frozenset({frozenset({0,
+ 1}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([0]),
- frozenset([0,
- 2])]),
- frozenset([frozenset([2]),
- frozenset([0,
- 2])])]),
- frozenset({frozenset({1, 2}), frozenset({0, 1, 2})}): frozenset([frozenset([frozenset([0,
- 2]),
- frozenset([0,
+ 2})}),
+ frozenset({frozenset({0}),
+ frozenset({0,
+ 2})}),
+ frozenset({frozenset({2}),
+ frozenset({0,
+ 2})})}),
+ frozenset({frozenset({1, 2}), frozenset({0, 1, 2})}): frozenset({frozenset({frozenset({0,
+ 2}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([0,
- 1]),
- frozenset([0,
+ 2})}),
+ frozenset({frozenset({0,
+ 1}),
+ frozenset({0,
1,
- 2])]),
- frozenset([frozenset([2]),
- frozenset([1,
- 2])]),
- frozenset([frozenset([1]),
- frozenset([1,
- 2])])])}"""
+ 2})}),
+ frozenset({frozenset({2}),
+ frozenset({1,
+ 2})}),
+ frozenset({frozenset({1}),
+ frozenset({1,
+ 2})})})}"""
cubo = test.test_set.linegraph(cube)
self.assertEqual(pprint.pformat(cubo), cubo_repr_tgt)