diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-06-30 23:06:06 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-06-30 23:06:06 (GMT) |
commit | c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9 (patch) | |
tree | 6350dab0b481e6de307dc4e043c6230f463a9ca7 /Lib/test/test_userdict.py | |
parent | 98d23f2e065713ccfbc07d9a0b65f737a212bfb5 (diff) | |
download | cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.zip cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.tar.gz cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.tar.bz2 |
convert old fail* assertions to assert*
Diffstat (limited to 'Lib/test/test_userdict.py')
-rw-r--r-- | Lib/test/test_userdict.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_userdict.py b/Lib/test/test_userdict.py index 5d4a0ff..9d0a8b1 100644 --- a/Lib/test/test_userdict.py +++ b/Lib/test/test_userdict.py @@ -38,9 +38,9 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol): self.assertEqual(collections.UserDict().fromkeys('one two'.split()), d4) self.assertEqual(collections.UserDict.fromkeys('one two'.split(), 1), d5) self.assertEqual(collections.UserDict().fromkeys('one two'.split(), 1), d5) - self.assert_(u1.fromkeys('one two'.split()) is not u1) - self.assert_(isinstance(u1.fromkeys('one two'.split()), collections.UserDict)) - self.assert_(isinstance(u2.fromkeys('one two'.split()), collections.UserDict)) + self.assertTrue(u1.fromkeys('one two'.split()) is not u1) + self.assertTrue(isinstance(u1.fromkeys('one two'.split()), collections.UserDict)) + self.assertTrue(isinstance(u2.fromkeys('one two'.split()), collections.UserDict)) # Test __repr__ self.assertEqual(str(u0), str(d0)) @@ -95,7 +95,7 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol): # Test "in". for i in u2.keys(): - self.assert_(i in u2) + self.assertTrue(i in u2) self.assertEqual(i in u1, i in d1) self.assertEqual(i in u0, i in d0) @@ -122,7 +122,7 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol): # Test setdefault t = collections.UserDict() self.assertEqual(t.setdefault("x", 42), 42) - self.assert_("x" in t) + self.assertTrue("x" in t) self.assertEqual(t.setdefault("x", 23), 42) # Test pop @@ -152,8 +152,8 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol): d = D({1: 2, 3: 4}) self.assertEqual(d[1], 2) self.assertEqual(d[3], 4) - self.assert_(2 not in d) - self.assert_(2 not in d.keys()) + self.assertTrue(2 not in d) + self.assertTrue(2 not in d.keys()) self.assertEqual(d[2], 42) class E(collections.UserDict): def __missing__(self, key): |