]> granicus.if.org Git - python/commitdiff
Issue #8422, test_genericpath: skip the creation of a directory with an invalid
authorVictor Stinner <victor.stinner@haypocalc.com>
Sun, 18 Apr 2010 08:23:42 +0000 (08:23 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sun, 18 Apr 2010 08:23:42 +0000 (08:23 +0000)
UTF name on Mac OS X because the OS deny it (the name have to be a valid UTF8
string).

Lib/test/test_genericpath.py

index 4ffc1cdd578ed7d771b43d25e5f856ed11b3e7b6..5d68e98d70740f3ad5fbe4573a67eb3b1382885e 100644 (file)
@@ -6,6 +6,7 @@ import unittest
 from test import support
 import os
 import genericpath
+import sys
 
 
 def safe_rmdir(dirname):
@@ -284,6 +285,9 @@ class CommonTest(GenericTest):
                 for path in ('', 'fuu', 'f\xf9\xf9', '/fuu', 'U:\\'):
                     self.assertIsInstance(abspath(path), str)
 
+    @unittest.skipIf(sys.platform == 'darwin',
+        "Mac OS X deny the creation of a directory with an invalid utf8 name")
+    def test_nonascii_abspath(self):
         # Test non-ASCII, non-UTF8 bytes in the path.
         with support.temp_cwd(b'\xe7w\xf0'):
             self.test_abspath()