use assert[Not]IsInstance where appropriate

This commit is contained in:
Ezio Melotti 2010-01-24 16:58:36 +00:00
parent f14c7fc33d
commit b0f5adc3f4
57 changed files with 269 additions and 272 deletions

View file

@ -552,7 +552,7 @@ class LongTest(unittest.TestCase):
y = int(x)
except OverflowError:
self.fail("int(long(sys.maxint) + 1) mustn't overflow")
self.assertTrue(isinstance(y, long),
self.assertIsInstance(y, long,
"int(long(sys.maxint) + 1) should have returned long")
x = hugeneg_aslong - 1
@ -560,7 +560,7 @@ class LongTest(unittest.TestCase):
y = int(x)
except OverflowError:
self.fail("int(long(-sys.maxint-1) - 1) mustn't overflow")
self.assertTrue(isinstance(y, long),
self.assertIsInstance(y, long,
"int(long(-sys.maxint-1) - 1) should have returned long")
class long2(long):