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

Method test_open

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

Source from the content-addressed store, hash-verified

112 _listdir_failure = NotADirectoryError
113
114 def test_open(self):
115 for name in self.files:
116 f = open(name, 'wb')
117 f.write((name+'\n').encode("utf-8"))
118 f.close()
119 os.stat(name)
120 self._apply_failure(os.listdir, name, self._listdir_failure)
121
122 # Skip the test on Apple platforms, because they don't normalize the filename to
123 # NFD (a variant of Unicode NFD form). Normalize the filename to NFC, NFKC,

Callers

nothing calls this directly

Calls 6

_apply_failureMethod · 0.95
openFunction · 0.50
writeMethod · 0.45
encodeMethod · 0.45
closeMethod · 0.45
statMethod · 0.45

Tested by

no test coverage detected