Add failing test for versioned repositories.

This commit is contained in:
Anthony Sottile 2014-06-01 21:09:02 -07:00
parent 3baae2fd1e
commit fdd6989ece
6 changed files with 44 additions and 0 deletions

View file

@ -72,6 +72,11 @@ def python_hooks_repo(dummy_git_repo):
yield _make_repo(dummy_git_repo, 'python_hooks_repo')
@pytest.yield_fixture
def python3_hooks_repo(dummy_git_repo):
yield _make_repo(dummy_git_repo, 'python3_hooks_repo')
@pytest.yield_fixture
def node_hooks_repo(dummy_git_repo):
yield _make_repo(dummy_git_repo, 'node_hooks_repo')
@ -133,6 +138,11 @@ def config_for_python_hooks_repo(python_hooks_repo):
yield _make_config(python_hooks_repo, 'foo', '\\.py$')
@pytest.yield_fixture
def config_for_python3_hooks_repo(python3_hooks_repo):
yield _make_config(python3_hooks_repo, 'python3-hook', '\\.py$')
@pytest.yield_fixture
def config_for_prints_cwd_repo(prints_cwd_repo):
yield _make_config(prints_cwd_repo, 'prints_cwd', '^$')

View file

@ -24,6 +24,15 @@ def test_run_a_python_hook(config_for_python_hooks_repo, store):
assert ret[1] == "['/dev/null']\nHello World\n"
@pytest.mark.xfail
@pytest.mark.integration
def test_run_versioned_hook(config_for_python3_hooks_repo, store):
repo = Repository.create(config_for_python3_hooks_repo, store)
ret = repo.run_hook('python3-hook', ['/dev/null'])
assert ret[0] == 0
assert ret[1] == "3.3\n['/dev/null']\nHello World\n"
@pytest.mark.integration
def test_lots_of_files(config_for_python_hooks_repo, store):
repo = Repository.create(config_for_python_hooks_repo, store)