Author: Amaury Forgeot d'Arc <[email protected]>
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"
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to