MCPcopy Index your code
hub / github.com/RustPython/RustPython / _check_output_of_default_create

Method _check_output_of_default_create

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

Source from the content-addressed store, hash-verified

140 self._check_output_of_default_create()
141
142 def _check_output_of_default_create(self):
143 self.isdir(self.bindir)
144 self.isdir(self.include)
145 self.isdir(*self.lib)
146 # Issue 21197
147 p = self.get_env_file('lib64')
148 conditions = ((struct.calcsize('P') == 8) and (os.name == 'posix') and
149 (sys.platform != 'darwin'))
150 if conditions:
151 self.assertTrue(os.path.islink(p))
152 else:
153 self.assertFalse(os.path.exists(p))
154 data = self.get_text_file_contents('pyvenv.cfg')
155 executable = sys._base_executable
156 path = os.path.dirname(executable)
157 self.assertIn('home = %s' % path, data)
158 self.assertIn('executable = %s' %
159 os.path.realpath(sys.executable), data)
160 copies = '' if os.name=='nt' else ' --copies'
161 cmd = (f'command = {sys.executable} -m venv{copies} --without-pip '
162 f'--without-scm-ignore-files {self.env_dir}')
163 self.assertIn(cmd, data)
164 fn = self.get_env_file(self.bindir, self.exe)
165 if not os.path.exists(fn): # diagnostics for Windows buildbot failures
166 bd = self.get_env_file(self.bindir)
167 print('Contents of %r:' % bd)
168 print(' %r' % os.listdir(bd))
169 self.assertTrue(os.path.exists(fn), 'File %r should exist.' % fn)
170
171 def test_config_file_command_key(self):
172 options = [

Callers 2

Calls 11

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

Tested by

no test coverage detected