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
|
|
@ -128,11 +128,11 @@ class TestPrint(unittest.TestCase):
|
|||
self.assertEqual(u''.join(buf.buf), 'hi nothing\n')
|
||||
buf = Recorder(False)
|
||||
print('hi', 'bye', end=u'\n', file=buf)
|
||||
self.assertTrue(isinstance(buf.buf[1], unicode))
|
||||
self.assertTrue(isinstance(buf.buf[3], unicode))
|
||||
self.assertIsInstance(buf.buf[1], unicode)
|
||||
self.assertIsInstance(buf.buf[3], unicode)
|
||||
del buf.buf[:]
|
||||
print(sep=u'x', file=buf)
|
||||
self.assertTrue(isinstance(buf.buf[-1], unicode))
|
||||
self.assertIsInstance(buf.buf[-1], unicode)
|
||||
|
||||
|
||||
def test_main():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue