mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
OMG we're running a hook
This commit is contained in:
parent
47bad120e4
commit
871ab4d72f
11 changed files with 105 additions and 25 deletions
|
|
@ -30,7 +30,6 @@ def test_create_repo_in_env(dummy_repo_config, dummy_git_repo):
|
|||
@pytest.mark.integration
|
||||
def test_install_python_repo_in_env(python_pre_commit_git_repo, config_for_python_pre_commit_git_repo):
|
||||
repo = Repository(config_for_python_pre_commit_git_repo)
|
||||
# TODO: do we need create here?
|
||||
repo.install()
|
||||
|
||||
assert os.path.exists(
|
||||
|
|
@ -43,6 +42,16 @@ def test_install_python_repo_in_env(python_pre_commit_git_repo, config_for_pytho
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
def test_run_a_hook_omg(config_for_python_pre_commit_git_repo):
|
||||
repo = Repository(config_for_python_pre_commit_git_repo)
|
||||
repo.install()
|
||||
ret = repo.run_hook('foo', [])
|
||||
|
||||
assert ret[0] == 0
|
||||
assert ret[1] == 'Hello World\n'
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_repo_config():
|
||||
config = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue