summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pprint.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-04-23 15:24:50 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-04-23 15:24:50 (GMT)
commit7d95e4072169911b228c9e42367afb5f17fd3db0 (patch)
treed07731f1b71b1eb5f653778141ca586069d216b1 /Lib/test/test_pprint.py
parent80d07f825108761af9fe2ac79c1ef50289c07c08 (diff)
downloadcpython-7d95e4072169911b228c9e42367afb5f17fd3db0.zip
cpython-7d95e4072169911b228c9e42367afb5f17fd3db0.tar.gz
cpython-7d95e4072169911b228c9e42367afb5f17fd3db0.tar.bz2
Implement PEP 412: Key-sharing dictionaries (closes #13903)
Patch from Mark Shannon.
Diffstat (limited to 'Lib/test/test_pprint.py')
-rw-r--r--Lib/test/test_pprint.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py
index 4e53cd8..b26291b 100644
--- a/Lib/test/test_pprint.py
+++ b/Lib/test/test_pprint.py
@@ -219,6 +219,8 @@ class QueryTestCase(unittest.TestCase):
others.should.not.be: like.this}"""
self.assertEqual(DottedPrettyPrinter().pformat(o), exp)
+ @unittest.expectedFailure
+ #See http://bugs.python.org/issue13907
@test.support.cpython_only
def test_set_reprs(self):
# This test creates a complex arrangement of frozensets and
@@ -241,10 +243,12 @@ class QueryTestCase(unittest.TestCase):
# Consequently, this test is fragile and
# implementation-dependent. Small changes to Python's sort
# algorithm cause the test to fail when it should pass.
+ # XXX Or changes to the dictionary implmentation...
self.assertEqual(pprint.pformat(set()), 'set()')
self.assertEqual(pprint.pformat(set(range(3))), '{0, 1, 2}')
self.assertEqual(pprint.pformat(frozenset()), 'frozenset()')
+
self.assertEqual(pprint.pformat(frozenset(range(3))), 'frozenset({0, 1, 2})')
cube_repr_tgt = """\
{frozenset(): frozenset({frozenset({2}), frozenset({0}), frozenset({1})}),