[Python-checkins] cpython: Issue #15441, #15478: Reenable test_nonascii_abspath() on Windows
victor.stinner
python-checkins at python.org
Wed Oct 31 23:01:34 CET 2012
http://hg.python.org/cpython/rev/b3434c1ae503
changeset: 80140:b3434c1ae503
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Oct 31 23:01:30 2012 +0100
summary:
Issue #15441, #15478: Reenable test_nonascii_abspath() on Windows
The real bug (issue #15478) has been fixed correctly.
files:
Lib/test/test_genericpath.py | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py
--- a/Lib/test/test_genericpath.py
+++ b/Lib/test/test_genericpath.py
@@ -311,14 +311,10 @@
@unittest.skipIf(sys.platform == 'darwin',
"Mac OS X denies the creation of a directory with an invalid utf8 name")
def test_nonascii_abspath(self):
- name = b'\xe7w\xf0'
- if sys.platform == 'win32':
- try:
- os.fsdecode(name)
- except UnicodeDecodeError:
- self.skipTest("the filename %a is not decodable "
- "from the ANSI code page %s"
- % (name, sys.getfilesystemencoding()))
+ if support.TESTFN_UNDECODABLE:
+ name = support.TESTFN_UNDECODABLE
+ else:
+ name = b'a\xffb\xe7w\xf0'
# Test non-ASCII, non-UTF8 bytes in the path.
with warnings.catch_warnings():
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list