Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5c1808a

Browse files
author
Victor Stinner
committed
test_pep277: display the filename as ascii on failure
1 parent 114b724 commit 5c1808a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/test/test_pep277.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ def test_normalize(self):
132132
for name in others:
133133
if sys.platform == 'darwin' and normalize('NFD', name) in files:
134134
# Mac OS X decomposes Unicode names. See comment above.
135-
os.stat(name)
135+
try:
136+
os.stat(name)
137+
except OSError as err:
138+
raise AssertionError("File %a doesn't exist" % name)
136139
continue
137140
self._apply_failure(open, name, IOError)
138141
self._apply_failure(os.stat, name, OSError)

0 commit comments

Comments
 (0)