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

Function test_unhealthy_old_virtualenv

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

Source from the content-addressed store, hash-verified

230
231
232def test_unhealthy_old_virtualenv(python_dir):
233 prefix, tmpdir = python_dir
234
235 python.install_environment(prefix, C.DEFAULT, ())
236
237 # simulate "old" virtualenv by deleting this file
238 os.remove(prefix.path('py_env-default/pyvenv.cfg'))
239
240 ret = python.health_check(prefix, C.DEFAULT)
241 assert ret == 'pyvenv.cfg does not exist (old virtualenv?)'
242
243
244def test_unhealthy_unexpected_pyvenv(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