mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +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
|
@ -133,7 +133,7 @@ class PosixTester(unittest.TestCase):
|
|||
fp = open(test_support.TESTFN)
|
||||
try:
|
||||
fd = posix.dup(fp.fileno())
|
||||
self.assertTrue(isinstance(fd, int))
|
||||
self.assertIsInstance(fd, int)
|
||||
os.close(fd)
|
||||
finally:
|
||||
fp.close()
|
||||
|
@ -273,7 +273,7 @@ class PosixTester(unittest.TestCase):
|
|||
def test_umask(self):
|
||||
if hasattr(posix, 'umask'):
|
||||
old_mask = posix.umask(0)
|
||||
self.assertTrue(isinstance(old_mask, int))
|
||||
self.assertIsInstance(old_mask, int)
|
||||
posix.umask(old_mask)
|
||||
|
||||
def test_strerror(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue