[pypy-commit] pypy default: Test and fix

amauryfa noreply at buildbot.pypy.org
Fri Feb 22 16:00:52 CET 2013


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: 
Changeset: r61610:19d28dd680a1
Date: 2013-02-22 15:37 +0100
http://bitbucket.org/pypy/pypy/changeset/19d28dd680a1/

Log:	Test and fix

diff --git a/pypy/module/_io/interp_bufferedio.py b/pypy/module/_io/interp_bufferedio.py
--- a/pypy/module/_io/interp_bufferedio.py
+++ b/pypy/module/_io/interp_bufferedio.py
@@ -678,6 +678,7 @@
                 if limit >= 0 and have > limit:
                     have = limit
                 pos = 0
+                found = False
                 while pos < have:
                     c = self.buffer[pos]
                     pos += 1
diff --git a/pypy/module/_io/test/test_bufferedio.py b/pypy/module/_io/test/test_bufferedio.py
--- a/pypy/module/_io/test/test_bufferedio.py
+++ b/pypy/module/_io/test/test_bufferedio.py
@@ -634,7 +634,7 @@
     def test_readline(self):
         import _io as io
         with io.BytesIO(b"abc\ndef\nxyzzy\nfoo\x00bar\nanother line") as raw:
-            with io.BufferedRandom(raw) as f:
+            with io.BufferedRandom(raw, buffer_size=10) as f:
                 assert f.readline() == b"abc\n"
                 assert f.readline(10) == b"def\n"
                 assert f.readline(2) == b"xy"


More information about the pypy-commit mailing list