(prefix, installed_environment, version)
| 283 | |
| 284 | @pytest.mark.parametrize('version', ('NULL', 'NA', "''")) |
| 285 | def 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) |
nothing calls this directly
no test coverage detected