]> granicus.if.org Git - python/commitdiff
Fixed a test for issue23908 with C locale.
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 3 Jul 2016 07:53:39 +0000 (10:53 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 3 Jul 2016 07:53:39 +0000 (10:53 +0300)
Lib/test/test_posix.py

index 7478234a9e041ee4cd985b3ce7279fb7f81b05f6..e0c84f2d6c6bc9beb0eaceded46b28bd1589f789 100644 (file)
@@ -580,6 +580,10 @@ class PosixTester(unittest.TestCase):
     @test_support.requires_unicode
     def test_path_with_null_unicode(self):
         fn = test_support.TESTFN_UNICODE
+        try:
+            fn.encode(test_support.TESTFN_ENCODING)
+        except (UnicodeError, TypeError):
+            self.skipTest("Requires unicode filenames support")
         fn_with_NUL = fn + u'\0'
         self.addCleanup(test_support.unlink, fn)
         test_support.unlink(fn)