mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +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
|
@ -233,15 +233,15 @@ class BoolTest(unittest.TestCase):
|
|||
|
||||
def test_boolean(self):
|
||||
self.assertEqual(True & 1, 1)
|
||||
self.assertTrue(not isinstance(True & 1, bool))
|
||||
self.assertNotIsInstance(True & 1, bool)
|
||||
self.assertIs(True & True, True)
|
||||
|
||||
self.assertEqual(True | 1, 1)
|
||||
self.assertTrue(not isinstance(True | 1, bool))
|
||||
self.assertNotIsInstance(True | 1, bool)
|
||||
self.assertIs(True | True, True)
|
||||
|
||||
self.assertEqual(True ^ 1, 0)
|
||||
self.assertTrue(not isinstance(True ^ 1, bool))
|
||||
self.assertNotIsInstance(True ^ 1, bool)
|
||||
self.assertIs(True ^ True, False)
|
||||
|
||||
def test_fileclosed(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue