mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 04:50:20 -06:00
Use a binary which works on windows
This commit is contained in:
@@ -550,14 +550,16 @@ def test_additional_golang_dependencies_installed(
|
||||
path = make_repo(tempdir_factory, 'golang_hooks_repo')
|
||||
config = make_config_from_repo(path)
|
||||
# A small go package
|
||||
config['hooks'][0]['additional_dependencies'] = ['github.com/firba1/tpol']
|
||||
deps = ['github.com/golang/example/hello']
|
||||
config['hooks'][0]['additional_dependencies'] = deps
|
||||
repo = Repository.create(config, store)
|
||||
repo.require_installed()
|
||||
binaries = os.listdir(repo.cmd_runner.path(
|
||||
helpers.environment_dir(golang.ENVIRONMENT_DIR, 'default'),
|
||||
'bin',
|
||||
helpers.environment_dir(golang.ENVIRONMENT_DIR, 'default'), 'bin',
|
||||
))
|
||||
assert 'tpol' in binaries
|
||||
# normalize for windows
|
||||
binaries = [os.path.splitext(binary)[0] for binary in binaries]
|
||||
assert 'hello' in binaries
|
||||
|
||||
|
||||
def test_reinstall(tempdir_factory, store, log_info_mock):
|
||||
|
||||
Reference in New Issue
Block a user