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

Method _do_directory

Lib/test/test_unicode_file.py:86–100  ·  view source on GitHub ↗
(self, make_name, chdir_name)

Source from the content-addressed store, hash-verified

84 self.assertFalse(os.path.exists(filename2 + '.new'))
85
86 def _do_directory(self, make_name, chdir_name):
87 if os.path.isdir(make_name):
88 rmtree(make_name)
89 os.mkdir(make_name)
90 try:
91 with change_cwd(chdir_name):
92 cwd_result = os.getcwd()
93 name_result = make_name
94
95 cwd_result = unicodedata.normalize("NFD", cwd_result)
96 name_result = unicodedata.normalize("NFD", name_result)
97
98 self.assertEqual(os.path.basename(cwd_result),name_result)
99 finally:
100 os.rmdir(make_name)
101
102 # The '_test' functions 'entry points with params' - ie, what the
103 # top-level 'test' functions would be if they could take params

Callers 1

test_directoriesMethod · 0.95

Calls 8

rmtreeFunction · 0.90
change_cwdFunction · 0.90
rmdirMethod · 0.80
isdirMethod · 0.45
mkdirMethod · 0.45
normalizeMethod · 0.45
assertEqualMethod · 0.45
basenameMethod · 0.45

Tested by

no test coverage detected