mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Address PR feedback
This commit is contained in:
parent
950bc2c7fb
commit
1eed1b51b8
2 changed files with 3 additions and 8 deletions
|
|
@ -72,7 +72,7 @@ def _test_hook_repo(
|
|||
path = make_repo(tempdir_factory, repo_path)
|
||||
config = make_config_from_repo(path, **(config_kwargs or {}))
|
||||
ret = _get_hook(config, store, hook_id).run(args)
|
||||
assert ret[0] == expected_return_code, "output was: {}".format(ret[1])
|
||||
assert ret[0] == expected_return_code
|
||||
assert _norm_out(ret[1]) == expected
|
||||
|
||||
|
||||
|
|
@ -271,11 +271,8 @@ def test_golang_hook(tempdir_factory, store):
|
|||
def test_golang_hook_still_works_when_gobin_is_set(tempdir_factory, store):
|
||||
gobin_dir = tempdir_factory.get()
|
||||
with envcontext([('GOBIN', gobin_dir)]):
|
||||
_test_hook_repo(
|
||||
tempdir_factory, store, 'golang_hooks_repo',
|
||||
'golang-hook', [], b'hello world\n',
|
||||
)
|
||||
assert os.listdir(gobin_dir) == [], "hook must not be installed in $GOBIN"
|
||||
test_golang_hook(tempdir_factory, store)
|
||||
assert os.listdir(gobin_dir) == []
|
||||
|
||||
|
||||
def test_rust_hook(tempdir_factory, store):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue