diff options
Diffstat (limited to 'Lib/test/test_userdict.py')
-rw-r--r-- | Lib/test/test_userdict.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/test_userdict.py b/Lib/test/test_userdict.py index 662c7f6..483910a 100644 --- a/Lib/test/test_userdict.py +++ b/Lib/test/test_userdict.py @@ -30,8 +30,8 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol): self.assertEqual(collections.UserDict(one=1, two=2), d2) # item sequence constructor self.assertEqual(collections.UserDict([('one',1), ('two',2)]), d2) - with self.assertWarnsRegex(DeprecationWarning, "'dict'"): - self.assertEqual(collections.UserDict(dict=[('one',1), ('two',2)]), d2) + self.assertEqual(collections.UserDict(dict=[('one',1), ('two',2)]), + {'dict': [('one', 1), ('two', 2)]}) # both together self.assertEqual(collections.UserDict([('one',1), ('two',2)], two=3, three=5), d3) @@ -149,9 +149,8 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol): [('dict', 42)]) self.assertEqual(list(collections.UserDict({}, dict=None).items()), [('dict', None)]) - with self.assertWarnsRegex(DeprecationWarning, "'dict'"): - self.assertEqual(list(collections.UserDict(dict={'a': 42}).items()), - [('a', 42)]) + self.assertEqual(list(collections.UserDict(dict={'a': 42}).items()), + [('dict', {'a': 42})]) self.assertRaises(TypeError, collections.UserDict, 42) self.assertRaises(TypeError, collections.UserDict, (), ()) self.assertRaises(TypeError, collections.UserDict.__init__) |