]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #15441, #15478: Reenable test_nonascii_abspath() on Windows
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 31 Oct 2012 22:01:30 +0000 (23:01 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 31 Oct 2012 22:01:30 +0000 (23:01 +0100)
The real bug (issue #15478) has been fixed correctly.

Lib/test/test_genericpath.py

index 3eadd5893c4cf57fda69ecfa1413abbd6616ce0d..600ffc03d920a32eff8af7f85c785642661b976d 100644 (file)
@@ -311,14 +311,10 @@ class CommonTest(GenericTest):
     @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():