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

Method setUp

Lib/test/test_shutil.py:2339–2354  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2337class TestWhich(BaseTest, unittest.TestCase):
2338
2339 def setUp(self):
2340 temp_dir = self.mkdtemp(prefix="Tmp")
2341 base_dir = os.path.join(temp_dir, TESTFN + '-basedir')
2342 os.mkdir(base_dir)
2343 self.dir = os.path.join(base_dir, TESTFN + '-dir')
2344 os.mkdir(self.dir)
2345 self.other_dir = os.path.join(base_dir, TESTFN + '-dir2')
2346 os.mkdir(self.other_dir)
2347 # Give the temp_file an ".exe" suffix for all.
2348 # It's needed on Windows and not harmful on other platforms.
2349 self.file = TESTFN + '.Exe'
2350 self.filepath = os.path.join(self.dir, self.file)
2351 self.create_file(self.filepath)
2352 self.env_path = self.dir
2353 self.curdir = os.curdir
2354 self.ext = ".EXE"
2355
2356 to_text_type = staticmethod(os.fsdecode)
2357

Callers

nothing calls this directly

Calls 4

create_fileMethod · 0.95
mkdtempMethod · 0.80
joinMethod · 0.45
mkdirMethod · 0.45

Tested by

no test coverage detected