summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_int.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-01-24 16:58:36 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-01-24 16:58:36 (GMT)
commitb0f5adc3f4e098b1744eeac65fc830fb1df2b8ab (patch)
treee2936db9f8e1194464aeb7e9546d5a892f7239c7 /Lib/test/test_int.py
parentf14c7fc33da8ba3aa28bbb7b0305ea12ab30be09 (diff)
downloadcpython-b0f5adc3f4e098b1744eeac65fc830fb1df2b8ab.zip
cpython-b0f5adc3f4e098b1744eeac65fc830fb1df2b8ab.tar.gz
cpython-b0f5adc3f4e098b1744eeac65fc830fb1df2b8ab.tar.bz2
use assert[Not]IsInstance where appropriate
Diffstat (limited to 'Lib/test/test_int.py')
-rw-r--r--Lib/test/test_int.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py
index e4cac0c..ec57842 100644
--- a/Lib/test/test_int.py
+++ b/Lib/test/test_int.py
@@ -76,15 +76,15 @@ class IntTestCases(unittest.TestCase):
s = repr(-1-sys.maxint)
x = int(s)
self.assertEqual(x+1, -sys.maxint)
- self.assertTrue(isinstance(x, int))
+ self.assertIsInstance(x, int)
# should return long
self.assertEqual(int(s[1:]), sys.maxint+1)
# should return long
x = int(1e100)
- self.assertTrue(isinstance(x, long))
+ self.assertIsInstance(x, long)
x = int(-1e100)
- self.assertTrue(isinstance(x, long))
+ self.assertIsInstance(x, long)
# SF bug 434186: 0x80000000/2 != 0x80000000>>1.
@@ -102,11 +102,11 @@ class IntTestCases(unittest.TestCase):
self.assertRaises(ValueError, int, '123\x00 245', 20)
x = int('1' * 600)
- self.assertTrue(isinstance(x, long))
+ self.assertIsInstance(x, long)
if have_unicode:
x = int(unichr(0x661) * 600)
- self.assertTrue(isinstance(x, long))
+ self.assertIsInstance(x, long)
self.assertRaises(TypeError, int, 1, 12)