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

Function test_unhealthy_unexpected_pyvenv

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

Source from the content-addressed store, hash-verified

242
243
244def test_unhealthy_unexpected_pyvenv(python_dir):
245 prefix, tmpdir = python_dir
246
247 python.install_environment(prefix, C.DEFAULT, ())
248
249 # simulate a buggy environment build (I don't think this is possible)
250 with open(prefix.path('py_env-default/pyvenv.cfg'), 'w'):
251 pass
252
253 ret = python.health_check(prefix, C.DEFAULT)
254 assert ret == "created virtualenv's pyvenv.cfg is missing `version_info`"
255
256
257def test_unhealthy_then_replaced(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