mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Issue #19664: test_userdict's repr test no longer depends on the order
of dict elements. Original patch by Serhiy Storchaka
This commit is contained in:
parent
ba723200ce
commit
5f8b0f5c59
2 changed files with 5 additions and 1 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue