diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-04-01 22:37:33 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-04-01 22:37:33 (GMT) |
commit | ce6f6c12c69d6745addf8b12623ab5cc768b0f79 (patch) | |
tree | 5363e5595396c07e606d01c62035b7f55d7b7d0c /Lib/test | |
parent | 8820f2a979806d4e8966a809052870f8f895b2f4 (diff) | |
download | cpython-ce6f6c12c69d6745addf8b12623ab5cc768b0f79.zip cpython-ce6f6c12c69d6745addf8b12623ab5cc768b0f79.tar.gz cpython-ce6f6c12c69d6745addf8b12623ab5cc768b0f79.tar.bz2 |
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.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_io.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index e26b708..39d3e5b 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -545,7 +545,7 @@ class StatefulIncrementalDecoder(codecs.IncrementalDecoder): 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 @@ class StatefulIncrementalDecoder(codecs.IncrementalDecoder): 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 @@ class TextIOWrapperTest(unittest.TestCase): 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): |