[pypy-commit] pypy use-file-star-for-file: test ioerror with unicode filename

bdkearns noreply at buildbot.pypy.org
Fri Aug 29 17:12:32 CEST 2014


Author: Brian Kearns <bdkearns at gmail.com>
Branch: use-file-star-for-file
Changeset: r73169:21addf9f84cc
Date: 2014-08-29 11:12 -0400
http://bitbucket.org/pypy/pypy/changeset/21addf9f84cc/

Log:	test ioerror with unicode filename

diff --git a/pypy/module/_file/test/test_file.py b/pypy/module/_file/test/test_file.py
--- a/pypy/module/_file/test/test_file.py
+++ b/pypy/module/_file/test/test_file.py
@@ -149,6 +149,8 @@
             u'\xe9'.encode(sys.getfilesystemencoding())
         except UnicodeEncodeError:
             skip("encoding not good enough")
+        exc = raises(IOError, self.file, 'zzz' + u'\xe9', 'r')
+        assert str(exc.value) == "[Errno 2] No such file or directory: u'zzz\\xe9'"
         f = self.file(self.temppath + u'\xe9', "w")
         f.close()
 


More information about the pypy-commit mailing list