mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use a binary which works on windows
This commit is contained in:
parent
51d673dff5
commit
abcc41611e
1 changed files with 6 additions and 4 deletions
|
|
@ -550,14 +550,16 @@ def test_additional_golang_dependencies_installed(
|
||||||
path = make_repo(tempdir_factory, 'golang_hooks_repo')
|
path = make_repo(tempdir_factory, 'golang_hooks_repo')
|
||||||
config = make_config_from_repo(path)
|
config = make_config_from_repo(path)
|
||||||
# A small go package
|
# 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 = Repository.create(config, store)
|
||||||
repo.require_installed()
|
repo.require_installed()
|
||||||
binaries = os.listdir(repo.cmd_runner.path(
|
binaries = os.listdir(repo.cmd_runner.path(
|
||||||
helpers.environment_dir(golang.ENVIRONMENT_DIR, 'default'),
|
helpers.environment_dir(golang.ENVIRONMENT_DIR, 'default'), 'bin',
|
||||||
'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):
|
def test_reinstall(tempdir_factory, store, log_info_mock):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue