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

Method setUp

Lib/test/test_venv.py:70–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

68 maxDiff = 80 * 50
69
70 def setUp(self):
71 self.env_dir = os.path.realpath(tempfile.mkdtemp())
72 if os.name == 'nt':
73 self.bindir = 'Scripts'
74 self.lib = ('Lib',)
75 self.include = 'Include'
76 else:
77 self.bindir = 'bin'
78 self.lib = ('lib', f'python{sysconfig._get_python_version_abi()}')
79 self.include = 'include'
80 executable = sys._base_executable
81 self.exe = os.path.split(executable)[-1]
82 if (sys.platform == 'win32'
83 and os.path.lexists(executable)
84 and not os.path.exists(executable)):
85 self.cannot_link_exe = True
86 else:
87 self.cannot_link_exe = False
88
89 def tearDown(self):
90 rmtree(self.env_dir)

Callers

nothing calls this directly

Calls 5

mkdtempMethod · 0.80
realpathMethod · 0.45
splitMethod · 0.45
lexistsMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected