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

Function test_health_check_without_version

tests/languages/r_test.py:285–297  ·  view source on GitHub ↗
(prefix, installed_environment, version)

Source from the content-addressed store, hash-verified

283
284@pytest.mark.parametrize('version', ('NULL', 'NA', "''"))
285def test_health_check_without_version(prefix, installed_environment, version):
286 prefix, env_dir = installed_environment
287
288 # simulate old pre-commit install by unsetting the installed version
289 r._execute_r_in_renv(
290 f'renv::settings$r.version({version})',
291 prefix=prefix, version=C.DEFAULT, cwd=env_dir,
292 )
293
294 # no R version specified fails as unhealty
295 msg = 'Hooks were installed with an unknown R version'
296 check_output = r.health_check(prefix, C.DEFAULT)
297 assert check_output is not None and check_output.startswith(msg)

Callers

nothing calls this directly

Calls 1

health_checkMethod · 0.80

Tested by

no test coverage detected