MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / test_unhealthy_python_goes_missing

Function test_unhealthy_python_goes_missing

tests/languages/python_test.py:183–197  ·  view source on GitHub ↗
(python_dir)

Source from the content-addressed store, hash-verified

181
182
183def test_unhealthy_python_goes_missing(python_dir):
184 prefix, tmpdir = python_dir
185
186 python.install_environment(prefix, C.DEFAULT, ())
187
188 exe_name = win_exe('python')
189 py_exe = prefix.path(python.bin_dir('py_env-default'), exe_name)
190 os.remove(py_exe)
191
192 ret = python.health_check(prefix, C.DEFAULT)
193 assert ret == (
194 f'virtualenv python version did not match created version:\n'
195 f'- actual version: <<error retrieving version from {py_exe}>>\n'
196 f'- expected version: {python._version_info(sys.executable)}\n'
197 )
198
199
200def test_unhealthy_with_version_change(python_dir):

Callers

nothing calls this directly

Calls 4

win_exeFunction · 0.90
install_environmentMethod · 0.80
pathMethod · 0.80
health_checkMethod · 0.80

Tested by

no test coverage detected