[pypy-commit] pypy default: Randomly try to fix test_io

arigo noreply at buildbot.pypy.org
Sun Jun 21 12:26:28 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r78226:9a1683dd96e2
Date: 2015-06-21 12:26 +0200
http://bitbucket.org/pypy/pypy/changeset/9a1683dd96e2/

Log:	Randomly try to fix test_io

diff --git a/pypy/module/_io/interp_textio.py b/pypy/module/_io/interp_textio.py
--- a/pypy/module/_io/interp_textio.py
+++ b/pypy/module/_io/interp_textio.py
@@ -548,6 +548,10 @@
         remain buffered in the decoder, yet to be converted."""
 
         if not self.w_decoder:
+            # very unsure about the following check, but some tests seem
+            # to expect a ValueError instead of an IOError in case the
+            # file was already closed.
+            self._check_closed(space)
             raise OperationError(space.w_IOError, space.wrap("not readable"))
 
         if self.telling:


More information about the pypy-commit mailing list