mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
use assert[Not]IsInstance where appropriate
This commit is contained in:
parent
f14c7fc33d
commit
b0f5adc3f4
57 changed files with 269 additions and 272 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue