diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-11-21 13:34:58 +0000 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-11-21 13:34:58 +0000 |
commit | 2623a37852153363335956afab010cb0beb7e74e (patch) | |
tree | e443a19bb7a87adc2158ef2e32da5c2f3b21936c /Lib/test/string_tests.py | |
parent | 40a92f5c65767d80ebc3b3be2c2ccfc5db3afb7b (diff) | |
download | cpython-git-2623a37852153363335956afab010cb0beb7e74e.tar.gz |
Merged revisions 86596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line
#9424: Replace deprecated assert* methods in the Python test suite.
........
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r-- | Lib/test/string_tests.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index eb5132e147..546b486a84 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -62,7 +62,7 @@ class CommonTest(unittest.TestCase): pass object = subtype(object) realresult = getattr(object, methodname)(*args) - self.assert_(object is not realresult) + self.assertTrue(object is not realresult) # check that object.method(*args) raises exc def checkraises(self, exc, object, methodname, *args): @@ -1243,34 +1243,34 @@ class MixinStrUnicodeTest: pass s1 = subclass("abcd") s2 = t().join([s1]) - self.assert_(s1 is not s2) - self.assert_(type(s2) is t) + self.assertTrue(s1 is not s2) + self.assertTrue(type(s2) is t) s1 = t("abcd") s2 = t().join([s1]) - self.assert_(s1 is s2) + self.assertTrue(s1 is s2) # Should also test mixed-type join. if t is unicode: s1 = subclass("abcd") s2 = "".join([s1]) - self.assert_(s1 is not s2) - self.assert_(type(s2) is t) + self.assertTrue(s1 is not s2) + self.assertTrue(type(s2) is t) s1 = t("abcd") s2 = "".join([s1]) - self.assert_(s1 is s2) + self.assertTrue(s1 is s2) elif t is str: s1 = subclass("abcd") s2 = u"".join([s1]) - self.assert_(s1 is not s2) - self.assert_(type(s2) is unicode) # promotes! + self.assertTrue(s1 is not s2) + self.assertTrue(type(s2) is unicode) # promotes! s1 = t("abcd") s2 = u"".join([s1]) - self.assert_(s1 is not s2) - self.assert_(type(s2) is unicode) # promotes! + self.assertTrue(s1 is not s2) + self.assertTrue(type(s2) is unicode) # promotes! else: self.fail("unexpected type for MixinStrUnicodeTest %r" % t) |