MCPcopy
hub / github.com/pre-commit/pre-commit / test_unhealthy_with_version_change

Function test_unhealthy_with_version_change

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

Source from the content-addressed store, hash-verified

198
199
200def test_unhealthy_with_version_change(python_dir):
201 prefix, tmpdir = python_dir
202
203 python.install_environment(prefix, C.DEFAULT, ())
204
205 with open(prefix.path('py_env-default/pyvenv.cfg'), 'a+') as f:
206 f.write('version_info = 1.2.3\n')
207
208 ret = python.health_check(prefix, C.DEFAULT)
209 assert ret == (
210 f'virtualenv python version did not match created version:\n'
211 f'- actual version: {python._version_info(sys.executable)}\n'
212 f'- expected version: 1.2.3\n'
213 )
214
215
216def test_unhealthy_system_version_changes(python_dir):

Callers

nothing calls this directly

Calls 3

install_environmentMethod · 0.80
pathMethod · 0.80
health_checkMethod · 0.80

Tested by

no test coverage detected