##// END OF EJS Templates
Fix for #875 Unicode Encoding Error
paul -
Show More
@@ -106,7 +106,7 b' def get_py_filename(name, force_win32=None):'
106 106 if os.path.isfile(name):
107 107 return name
108 108 else:
109 raise IOError,'File `%s` not found.' % name
109 raise IOError,'File `%r` not found.' % name
110 110
111 111
112 112 def filefind(filename, path_dirs=None):
@@ -406,3 +406,10 b' def test_get_py_filename():'
406 406 else:
407 407 nt.assert_raises(IOError, path.get_py_filename, '"foo with spaces.py"', force_win32=False)
408 408 nt.assert_raises(IOError, path.get_py_filename, "'foo with spaces.py'", force_win32=False)
409
410 def test_unicode_in_filename():
411 try:
412 # these calls should not throw unicode encode exceptions
413 path.get_py_filename(u'fooéè.py', force_win32=False)
414 except IOError as ex:
415 str(ex)
General Comments 0
You need to be logged in to leave comments. Login now