summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-11-22 00:16:56 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-11-22 00:16:56 (GMT)
commit5f8b0f5c59f273c195fb20e18d1847b868288b64 (patch)
tree82f4425a7fb00da557c8e82cbe6aa238a69f8d22 /Lib
parentba723200ce3effa5bea05a10fd01e3bb89ea8da7 (diff)
downloadcpython-5f8b0f5c59f273c195fb20e18d1847b868288b64.zip
cpython-5f8b0f5c59f273c195fb20e18d1847b868288b64.tar.gz
cpython-5f8b0f5c59f273c195fb20e18d1847b868288b64.tar.bz2
Issue #19664: test_userdict's repr test no longer depends on the order
of dict elements. Original patch by Serhiy Storchaka
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_userdict.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_userdict.py b/Lib/test/test_userdict.py
index 137c445..4d89965 100644
--- a/Lib/test/test_userdict.py
+++ b/Lib/test/test_userdict.py
@@ -45,7 +45,8 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
# Test __repr__
self.assertEqual(str(u0), str(d0))
self.assertEqual(repr(u1), repr(d1))
- self.assertEqual(repr(u2), repr(d2))
+ self.assertIn(repr(u2), ("{'one': 1, 'two': 2}",
+ "{'two': 2, 'one': 1}"))
# Test rich comparison and __len__
all = [d0, d1, d2, u, u0, u1, u2, uu, uu0, uu1, uu2]