summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode_file_functions.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_unicode_file_functions.py')
-rw-r--r--Lib/test/test_unicode_file_functions.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_unicode_file_functions.py b/Lib/test/test_unicode_file_functions.py
index 47619c8..25c16e3 100644
--- a/Lib/test/test_unicode_file_functions.py
+++ b/Lib/test/test_unicode_file_functions.py
@@ -5,7 +5,7 @@ import sys
import unittest
import warnings
from unicodedata import normalize
-from test.support import os_helper
+from test.support import is_apple, os_helper
from test import support
@@ -23,13 +23,13 @@ filenames = [
'10_\u1fee\u1ffd',
]
-# Mac OS X decomposes Unicode names, using Normal Form D.
+# Apple platforms decompose Unicode names, using Normal Form D.
# http://developer.apple.com/mac/library/qa/qa2001/qa1173.html
# "However, most volume formats do not follow the exact specification for
# these normal forms. For example, HFS Plus uses a variant of Normal Form D
# in which U+2000 through U+2FFF, U+F900 through U+FAFF, and U+2F800 through
# U+2FAFF are not decomposed."
-if sys.platform != 'darwin':
+if not is_apple:
filenames.extend([
# Specific code points: NFC(fn), NFD(fn), NFKC(fn) and NFKD(fn) all different
'11_\u0385\u03d3\u03d4',
@@ -119,11 +119,11 @@ class UnicodeFileTests(unittest.TestCase):
os.stat(name)
self._apply_failure(os.listdir, name, self._listdir_failure)
- # Skip the test on darwin, because darwin does normalize the filename to
+ # Skip the test on Apple platforms, because they don't normalize the filename to
# NFD (a variant of Unicode NFD form). Normalize the filename to NFC, NFKC,
# NFKD in Python is useless, because darwin will normalize it later and so
# open(), os.stat(), etc. don't raise any exception.
- @unittest.skipIf(sys.platform == 'darwin', 'irrelevant test on Mac OS X')
+ @unittest.skipIf(is_apple, 'irrelevant test on Apple platforms')
@unittest.skipIf(
support.is_emscripten or support.is_wasi,
"test fails on Emscripten/WASI when host platform is macOS."
@@ -142,10 +142,10 @@ class UnicodeFileTests(unittest.TestCase):
self._apply_failure(os.remove, name)
self._apply_failure(os.listdir, name)
- # Skip the test on darwin, because darwin uses a normalization different
+ # Skip the test on Apple platforms, because they use a normalization different
# than Python NFD normalization: filenames are different even if we use
# Python NFD normalization.
- @unittest.skipIf(sys.platform == 'darwin', 'irrelevant test on Mac OS X')
+ @unittest.skipIf(is_apple, 'irrelevant test on Apple platforms')
def test_listdir(self):
sf0 = set(self.files)
with warnings.catch_warnings():