Use sequence repetition instead of bytes constructor with integer argument.

This commit is contained in:
Serhiy Storchaka 2016-09-11 14:41:02 +03:00
parent ab8740058a
commit 5f1a5187f7
12 changed files with 20 additions and 20 deletions

View file

@ -1812,7 +1812,7 @@ class BufferedRWPairTest(unittest.TestCase):
with self.subTest(method):
pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
data = byteslike(5)
data = byteslike(b'\0' * 5)
self.assertEqual(getattr(pair, method)(data), 5)
self.assertEqual(bytes(data), b"abcde")