[pypy-commit] pypy default: Attempt to fix the test on some machines, where the open() fails with

arigo noreply at buildbot.pypy.org
Sat Jun 27 13:50:32 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r78328:655704b3f51b
Date: 2015-06-27 13:50 +0200
http://bitbucket.org/pypy/pypy/changeset/655704b3f51b/

Log:	Attempt to fix the test on some machines, where the open() fails
	with "IOError: could not determine default encoding"

diff --git a/pypy/module/_io/test/test_io.py b/pypy/module/_io/test/test_io.py
--- a/pypy/module/_io/test/test_io.py
+++ b/pypy/module/_io/test/test_io.py
@@ -420,6 +420,8 @@
                 {"mode": "w+b", "buffering": 0},
             ]:
             print kwargs
+            if "b" not in kwargs["mode"]:
+                kwargs["encoding"] = "ascii"
             f = _io.open(self.tmpfile, **kwargs)
             f.close()
             raises(ValueError, f.flush)


More information about the pypy-commit mailing list