[Python-checkins] r69866 - python/branches/io-c/Lib/test/test_io.py
benjamin.peterson
python-checkins at python.org
Sun Feb 22 02:05:28 CET 2009
Author: benjamin.peterson
Date: Sun Feb 22 02:05:28 2009
New Revision: 69866
Log:
use implementation specific classes
Modified:
python/branches/io-c/Lib/test/test_io.py
Modified: python/branches/io-c/Lib/test/test_io.py
==============================================================================
--- python/branches/io-c/Lib/test/test_io.py (original)
+++ python/branches/io-c/Lib/test/test_io.py Sun Feb 22 02:05:28 2009
@@ -1027,7 +1027,7 @@
self.assertEquals(b"dddeee", raw._write_stack[0])
def testSeekAndTell(self):
- raw = io.BytesIO(b"asdfghjkl")
+ raw = self.BytesIO(b"asdfghjkl")
rw = self.tp(raw)
self.assertEquals(b"as", rw.read(2))
@@ -1047,7 +1047,7 @@
self.assertRaises(TypeError, rw.seek, 0.0)
def check_flush_and_read(self, read_func):
- raw = io.BytesIO(b"abcdefghi")
+ raw = self.BytesIO(b"abcdefghi")
bufio = self.tp(raw)
self.assertEquals(b"ab", read_func(bufio, 2))
@@ -1086,7 +1086,7 @@
self.check_flush_and_read(_peek)
def testFlushAndWrite(self):
- raw = io.BytesIO(b"abcdefghi")
+ raw = self.BytesIO(b"abcdefghi")
bufio = self.tp(raw)
bufio.write(b"123")
@@ -1142,6 +1142,7 @@
tp = io.BufferedRandom
BlockingIOError = io.BlockingIOError
FileIO = io.FileIO
+ BytesIO = io.BytesIO
MockRawIO = CMockRawIO
MockFileIO = CMockFileIO
MisbehavedRawIO = CMisbehavedRawIO
@@ -1151,6 +1152,7 @@
tp = pyio.BufferedRandom
BlockingIOError = pyio.BlockingIOError
FileIO = pyio.FileIO
+ BytesIO = pyio.BytesIO
MockRawIO = PyMockRawIO
MockFileIO = PyMockFileIO
MisbehavedRawIO = PyMisbehavedRawIO
More information about the Python-checkins
mailing list