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

@ -249,8 +249,8 @@ if 1:
self.fail("How many bits *does* this machine have???")
# Verify treatment of contant folding on -(sys.maxint+1)
# i.e. -2147483648 on 32 bit platforms. Should return int, not long.
self.assertTrue(isinstance(eval("%s" % (-sys.maxint - 1)), int))
self.assertTrue(isinstance(eval("%s" % (-sys.maxint - 2)), long))
self.assertIsInstance(eval("%s" % (-sys.maxint - 1)), int)
self.assertIsInstance(eval("%s" % (-sys.maxint - 2)), long)
if sys.maxint == 9223372036854775807:
def test_32_63_bit_values(self):
@ -265,7 +265,7 @@ if 1:
for variable in self.test_32_63_bit_values.func_code.co_consts:
if variable is not None:
self.assertTrue(isinstance(variable, int))
self.assertIsInstance(variable, int)
def test_sequence_unpacking_error(self):
# Verify sequence packing/unpacking with "or". SF bug #757818