Author: Armin Rigo <ar...@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)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to