summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_userdict.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_userdict.py')
-rw-r--r--Lib/test/test_userdict.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_userdict.py b/Lib/test/test_userdict.py
index cf631ff..c86a773 100644
--- a/Lib/test/test_userdict.py
+++ b/Lib/test/test_userdict.py
@@ -45,9 +45,7 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
# Test __repr__
self.assertEqual(str(u0), str(d0))
self.assertEqual(repr(u1), repr(d1))
- # Silence Py3k warning
- with test_support.check_warnings():
- self.assertEqual(eval('`u2`'), eval('`d2`'))
+ self.assertEqual(`u2`, `d2`)
# Test __cmp__ and __len__
all = [d0, d1, d2, u, u0, u1, u2, uu, uu0, uu1, uu2]
@@ -97,14 +95,12 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
# Test has_key and "in".
for i in u2.keys():
+ self.assertTrue(u2.has_key(i))
self.assertTrue(i in u2)
+ self.assertEqual(u1.has_key(i), d1.has_key(i))
self.assertEqual(i in u1, i in d1)
+ self.assertEqual(u0.has_key(i), d0.has_key(i))
self.assertEqual(i in u0, i in d0)
- # Silence Py3k warning
- with test_support.check_warnings():
- self.assertTrue(u2.has_key(i))
- self.assertEqual(u1.has_key(i), d1.has_key(i))
- self.assertEqual(u0.has_key(i), d0.has_key(i))
# Test update
t = UserDict.UserDict()