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

Function test_rust_cli_additional_dependencies

tests/languages/rust_test.py:88–102  ·  view source on GitHub ↗
(tmp_path, dep)

Source from the content-addressed store, hash-verified

86
87@pytest.mark.parametrize('dep', ('cli:shellharden:4.2.0', 'cli:shellharden'))
88def test_rust_cli_additional_dependencies(tmp_path, dep):
89 _make_local_repo(str(tmp_path))
90
91 t_sh = tmp_path.joinpath('t.sh')
92 t_sh.write_text('echo $hi\n')
93
94 assert rust.get_default_version() == 'system'
95 ret = run_language(
96 tmp_path,
97 rust,
98 'shellharden --transform',
99 deps=(dep,),
100 args=(str(t_sh),),
101 )
102 assert ret == (0, b'echo "$hi"\n')
103
104
105def test_run_lib_additional_dependencies(tmp_path):

Callers

nothing calls this directly

Calls 3

_make_local_repoFunction · 0.90
run_languageFunction · 0.90
get_default_versionMethod · 0.80

Tested by

no test coverage detected