diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-06-30 23:06:06 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-06-30 23:06:06 +0000 |
commit | c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9 (patch) | |
tree | 6350dab0b481e6de307dc4e043c6230f463a9ca7 /Lib/test/test_int.py | |
parent | 98d23f2e065713ccfbc07d9a0b65f737a212bfb5 (diff) | |
download | cpython-git-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.tar.gz |
convert old fail* assertions to assert*
Diffstat (limited to 'Lib/test/test_int.py')
-rw-r--r-- | Lib/test/test_int.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py index dd40ef6fe6..d56e1f0da3 100644 --- a/Lib/test/test_int.py +++ b/Lib/test/test_int.py @@ -52,15 +52,15 @@ class IntTestCases(unittest.TestCase): s = repr(-1-sys.maxsize) x = int(s) self.assertEqual(x+1, -sys.maxsize) - self.assert_(isinstance(x, int)) + self.assertTrue(isinstance(x, int)) # should return long self.assertEqual(int(s[1:]), sys.maxsize+1) # should return long x = int(1e100) - self.assert_(isinstance(x, int)) + self.assertTrue(isinstance(x, int)) x = int(-1e100) - self.assert_(isinstance(x, int)) + self.assertTrue(isinstance(x, int)) # SF bug 434186: 0x80000000/2 != 0x80000000>>1. @@ -78,7 +78,7 @@ class IntTestCases(unittest.TestCase): self.assertRaises(ValueError, int, '123\x00 245', 20) x = int('1' * 600) - self.assert_(isinstance(x, int)) + self.assertTrue(isinstance(x, int)) self.assertRaises(TypeError, int, 1, 12) @@ -96,8 +96,8 @@ class IntTestCases(unittest.TestCase): self.assertRaises(ValueError, int, "0b", 0) # Bug #3236: Return small longs from PyLong_FromString - self.assert_(int("10") is 10) - self.assert_(int("-1") is -1) + self.assertTrue(int("10") is 10) + self.assertTrue(int("-1") is -1) # SF bug 1334662: int(string, base) wrong answers # Various representations of 2**32 evaluated to 0 |