MCPcopy Index your code
hub / github.com/python/cpython / test_normalize

Method test_normalize

Lib/test/test_unicode_file_functions.py:131–143  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

129 "test fails on WASI when host platform is macOS."
130 )
131 def test_normalize(self):
132 files = set(self.files)
133 others = set()
134 for nf in set(['NFC', 'NFD', 'NFKC', 'NFKD']):
135 others |= set(normalize(nf, file) for file in files)
136 others -= files
137 for name in others:
138 self._apply_failure(open, name)
139 self._apply_failure(os.stat, name)
140 self._apply_failure(os.chdir, name)
141 self._apply_failure(os.rmdir, name)
142 self._apply_failure(os.remove, name)
143 self._apply_failure(os.listdir, name)
144
145 # Skip the test on Apple platforms, because they use a normalization different
146 # than Python NFD normalization: filenames are different even if we use

Callers

nothing calls this directly

Calls 3

_apply_failureMethod · 0.95
setFunction · 0.85
normalizeFunction · 0.50

Tested by

no test coverage detected