[Python-checkins] r62095 - python/trunk/Lib/test/test_io.py
amaury.forgeotdarc
python-checkins at python.org
Wed Apr 2 00:37:43 CEST 2008
Author: amaury.forgeotdarc
Date: Wed Apr 2 00:37:33 2008
New Revision: 62095
Modified:
python/trunk/Lib/test/test_io.py
Log:
Fix and enable a skipped test:
with python 2.6, enumerating bytes yields 1-char strings, not numbers.
Don't merge this into the py3k branch.
Modified: python/trunk/Lib/test/test_io.py
==============================================================================
--- python/trunk/Lib/test/test_io.py (original)
+++ python/trunk/Lib/test/test_io.py Wed Apr 2 00:37:33 2008
@@ -545,7 +545,7 @@
output = ''
for b in input:
if self.i == 0: # variable-length, terminated with period
- if b == ord('.'):
+ if b == '.':
if self.buffer:
output += self.process_word()
else:
@@ -560,9 +560,9 @@
def process_word(self):
output = ''
- if self.buffer[0] == ord('i'):
+ if self.buffer[0] == 'i':
self.i = min(99, int(self.buffer[1:] or 0)) # set input length
- elif self.buffer[0] == ord('o'):
+ elif self.buffer[0] == 'o':
self.o = min(99, int(self.buffer[1:] or 0)) # set output length
else:
output = self.buffer.decode('ascii')
@@ -895,8 +895,7 @@
f.readline()
f.tell()
- # FIXME: figure out why the test fails with Python 2.6
- def XXXtestSeekAndTell(self):
+ def testSeekAndTell(self):
"""Test seek/tell using the StatefulIncrementalDecoder."""
def lookupTestDecoder(name):
More information about the Python-checkins
mailing list