diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-19 17:35:00 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-19 17:35:00 (GMT) |
commit | 5c1808a1a81c22ae60d170320f454afb207454d1 (patch) | |
tree | 499119257b20e70b4f6459a379c76cef80131708 /Lib/test/test_pep277.py | |
parent | 114b724a4b54bf50e11620d44647d59762a30d01 (diff) | |
download | cpython-5c1808a1a81c22ae60d170320f454afb207454d1.zip cpython-5c1808a1a81c22ae60d170320f454afb207454d1.tar.gz cpython-5c1808a1a81c22ae60d170320f454afb207454d1.tar.bz2 |
test_pep277: display the filename as ascii on failure
Diffstat (limited to 'Lib/test/test_pep277.py')
-rw-r--r-- | Lib/test/test_pep277.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_pep277.py b/Lib/test/test_pep277.py index 0699317..862cdbb 100644 --- a/Lib/test/test_pep277.py +++ b/Lib/test/test_pep277.py @@ -132,7 +132,10 @@ class UnicodeFileTests(unittest.TestCase): for name in others: if sys.platform == 'darwin' and normalize('NFD', name) in files: # Mac OS X decomposes Unicode names. See comment above. - os.stat(name) + try: + os.stat(name) + except OSError as err: + raise AssertionError("File %a doesn't exist" % name) continue self._apply_failure(open, name, IOError) self._apply_failure(os.stat, name, OSError) |