[pypy-commit] pypy py3k: skip when the fsencoding can't handle this filename
pjenvey
noreply at buildbot.pypy.org
Fri May 23 02:27:04 CEST 2014
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r71680:d4e74c26a617
Date: 2014-05-22 16:41 -0700
http://bitbucket.org/pypy/pypy/changeset/d4e74c26a617/
Log: skip when the fsencoding can't handle this filename
diff --git a/pypy/module/_io/test/test_fileio.py b/pypy/module/_io/test/test_fileio.py
--- a/pypy/module/_io/test/test_fileio.py
+++ b/pypy/module/_io/test/test_fileio.py
@@ -60,6 +60,12 @@
import _io
import os
path = os.path.join(self.tmpdir, '_pypy-日本')
+ try:
+ os.fsencode(path)
+ except UnicodeEncodeError:
+ import sys
+ skip("can't run this test with %s as filesystem encoding" %
+ sys.getfilesystemencoding())
exc = raises(IOError, _io.FileIO, path)
expected = "[Errno 2] No such file or directory: %r" % path
assert str(exc.value) == expected
More information about the pypy-commit
mailing list