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

Method _check_output_of_default_create

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

Source from the content-addressed store, hash-verified

134 self._check_output_of_default_create()
135
136 def _check_output_of_default_create(self):
137 self.isdir(self.bindir)
138 self.isdir(self.include)
139 self.isdir(*self.lib)
140 p = self.get_env_file('lib64')
141 if os.path.exists(p):
142 self.assertFalse(os.path.islink(p))
143 data = self.get_text_file_contents('pyvenv.cfg')
144 executable = sys._base_executable
145 path = os.path.dirname(executable)
146 self.assertIn('home = %s' % path, data)
147 self.assertIn('executable = %s' %
148 os.path.realpath(sys.executable), data)
149 copies = '' if os.name=='nt' else ' --copies'
150 cmd = (f'command = {sys.executable} -m venv{copies} --without-pip '
151 f'--without-scm-ignore-files {self.env_dir}')
152 self.assertIn(cmd, data)
153 fn = self.get_env_file(self.bindir, self.exe)
154 if not os.path.exists(fn): # diagnostics for Windows buildbot failures
155 bd = self.get_env_file(self.bindir)
156 print('Contents of %r:' % bd)
157 print(' %r' % os.listdir(bd))
158 self.assertTrue(os.path.exists(fn), 'File %r should exist.' % fn)
159
160 def test_config_file_command_key(self):
161 options = [

Callers 2

Calls 11

isdirMethod · 0.95
get_env_fileMethod · 0.80
assertFalseMethod · 0.80
islinkMethod · 0.80
assertInMethod · 0.80
listdirMethod · 0.80
assertTrueMethod · 0.80
existsMethod · 0.45
dirnameMethod · 0.45
realpathMethod · 0.45

Tested by

no test coverage detected