adjust the run_hook api to no longer take Hook

This commit is contained in:
Anthony Sottile 2023-01-16 16:34:01 -05:00
parent 48ae18a2cb
commit 628c876b2d
26 changed files with 163 additions and 192 deletions

View file

@ -23,7 +23,7 @@ def _test_r_parsing(
repo = make_repo(tempdir_factory, 'r_hooks_repo')
config = make_config_from_repo(repo)
hook = _get_hook_no_install(config, store, hook_id)
ret = r._cmd_from_hook(hook)
ret = r._cmd_from_hook(hook.prefix, hook.entry, hook.args)
expected_path = os.path.join(hook.prefix.prefix_dir, f'{hook_id}.R')
expected = (
'Rscript',
@ -111,7 +111,7 @@ def test_r_parsing_file_local(tempdir_factory, store):
}],
}
hook = _get_hook_no_install(config, store, 'local-r')
ret = r._cmd_from_hook(hook)
ret = r._cmd_from_hook(hook.prefix, hook.entry, hook.args)
assert ret == (
'Rscript',
'--no-save', '--no-restore', '--no-site-file', '--no-environ',