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

Method setUp

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

Source from the content-addressed store, hash-verified

63 normal_form = None
64
65 def setUp(self):
66 try:
67 os.mkdir(os_helper.TESTFN)
68 except FileExistsError:
69 pass
70 self.addCleanup(os_helper.rmtree, os_helper.TESTFN)
71
72 files = set()
73 for name in self.files:
74 name = os.path.join(os_helper.TESTFN, self.norm(name))
75 with open(name, 'wb') as f:
76 f.write((name+'\n').encode("utf-8"))
77 os.stat(name)
78 files.add(name)
79 self.files = files
80
81 def norm(self, s):
82 if self.normal_form:

Callers

nothing calls this directly

Calls 10

normMethod · 0.95
setFunction · 0.85
addCleanupMethod · 0.80
openFunction · 0.50
mkdirMethod · 0.45
joinMethod · 0.45
writeMethod · 0.45
encodeMethod · 0.45
statMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected