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

Method pip_cmd_checker

Lib/test/test_venv.py:242–255  ·  view source on GitHub ↗
(cmd, **kwargs)

Source from the content-addressed store, hash-verified

240 expect_exe = os.path.normcase(os.path.realpath(expect_exe))
241
242 def pip_cmd_checker(cmd, **kwargs):
243 self.assertEqual(
244 cmd[1:],
245 [
246 '-m',
247 'pip',
248 'install',
249 '--upgrade',
250 'pip',
251 ]
252 )
253 exe_dir = os.path.normcase(os.path.dirname(cmd[0]))
254 expected_dir = os.path.normcase(os.path.dirname(expect_exe))
255 self.assertEqual(exe_dir, expected_dir)
256
257 fake_context = builder.ensure_directories(fake_env_dir)
258 with patch('venv.subprocess.check_output', pip_cmd_checker):

Callers

nothing calls this directly

Calls 3

normcaseMethod · 0.80
assertEqualMethod · 0.45
dirnameMethod · 0.45

Tested by

no test coverage detected