OMG we're running a hook

This commit is contained in:
Anthony Sottile 2014-03-13 22:12:33 -07:00
parent 47bad120e4
commit 871ab4d72f
11 changed files with 105 additions and 25 deletions

View file

@ -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 = {