mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Install hooks before attempting to run anything
This commit is contained in:
parent
76ffb3665a
commit
31a3b2ecb6
3 changed files with 7 additions and 22 deletions
|
|
@ -8,7 +8,7 @@ from plumbum import local
|
|||
import pre_commit.constants as C
|
||||
from pre_commit.runner import Runner
|
||||
from testing.fixtures import git_dir
|
||||
from testing.fixtures import make_repo
|
||||
from testing.fixtures import make_consuming_repo
|
||||
|
||||
|
||||
def test_init_has_no_side_effects(tmpdir):
|
||||
|
|
@ -47,14 +47,9 @@ def test_config_file_path():
|
|||
|
||||
|
||||
def test_repositories(tmpdir_factory, mock_out_store_directory):
|
||||
# TODO: make this not have external deps
|
||||
path = make_repo(tmpdir_factory, 'consumer_repo')
|
||||
path = make_consuming_repo(tmpdir_factory, 'script_hooks_repo')
|
||||
runner = Runner(path)
|
||||
assert len(runner.repositories) == 2
|
||||
assert [repo.repo_url for repo in runner.repositories] == [
|
||||
'git@github.com:pre-commit/pre-commit-hooks',
|
||||
'git@github.com:pre-commit/pre-commit',
|
||||
]
|
||||
assert len(runner.repositories) == 1
|
||||
|
||||
|
||||
def test_pre_commit_path():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue