diff options
author | Guido van Rossum <guido@python.org> | 2007-05-24 16:11:18 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-24 16:11:18 (GMT) |
commit | 305b9246a75cf4b1eac29c9b5b41cb5541daa7ee (patch) | |
tree | 46f4be18910d1bb94816996b6a170ed589a2fc19 /Lib/test/test_bufio.py | |
parent | 6f376c40317e693c5eea0356fbb90d7394f21ff0 (diff) | |
download | cpython-305b9246a75cf4b1eac29c9b5b41cb5541daa7ee.zip cpython-305b9246a75cf4b1eac29c9b5b41cb5541daa7ee.tar.gz cpython-305b9246a75cf4b1eac29c9b5b41cb5541daa7ee.tar.bz2 |
Fix test_bool and test_bufio.
Diffstat (limited to 'Lib/test/test_bufio.py')
-rw-r--r-- | Lib/test/test_bufio.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_bufio.py b/Lib/test/test_bufio.py index c3a02d1..84d772e 100644 --- a/Lib/test/test_bufio.py +++ b/Lib/test/test_bufio.py @@ -19,12 +19,12 @@ class BufferSizeTest(unittest.TestCase): try: # write once with \n and once without f.write(s) - f.write("\n") + f.write(b"\n") f.write(s) f.close() f = open(test_support.TESTFN, "rb") line = f.readline() - self.assertEqual(line, s + "\n") + self.assertEqual(line, s + b"\n") line = f.readline() self.assertEqual(line, s) line = f.readline() @@ -48,16 +48,16 @@ class BufferSizeTest(unittest.TestCase): teststring = pattern * q + pattern[:r] self.assertEqual(len(teststring), length) self.try_one(teststring) - self.try_one(teststring + "x") + self.try_one(teststring + b"x") self.try_one(teststring[:-1]) def test_primepat(self): # A pattern with prime length, to avoid simple relationships with # stdio buffer sizes. - self.drive_one("1234567890\00\01\02\03\04\05\06") + self.drive_one(b"1234567890\00\01\02\03\04\05\06") def test_nullpat(self): - self.drive_one("\0" * 1000) + self.drive_one(bytes(1000)) def test_main(): test_support.run_unittest(BufferSizeTest) |