Simplify a few things

This commit is contained in:
Anthony Sottile 2015-01-14 19:21:32 -08:00
parent b707cbba06
commit 931c69b3fa
7 changed files with 29 additions and 97 deletions

View file

@ -7,7 +7,6 @@ import os.path
import pre_commit.constants as C
from pre_commit.runner import Runner
from pre_commit.util import cwd
from pre_commit.util import resource_filename
from testing.fixtures import git_dir
from testing.fixtures import make_consuming_repo
@ -65,28 +64,6 @@ def test_pre_push_path():
assert runner.pre_push_path == expected_path
def test_pre_commit_legacy_path():
runner = Runner('foo/bar')
expected_path = os.path.join('foo/bar', '.git/hooks/pre-commit.legacy')
assert runner.pre_commit_legacy_path == expected_path
def test_pre_push_legacy_path():
runner = Runner('foo/bar')
expected_path = os.path.join('foo/bar', '.git/hooks/pre-push.legacy')
assert runner.pre_push_legacy_path == expected_path
def test_pre_template():
runner = Runner('foo/bar')
assert runner.pre_template == resource_filename('hook-tmpl')
def test_pre_push_template():
runner = Runner('foo/bar')
assert runner.pre_push_template == resource_filename('pre-push-tmpl')
def test_cmd_runner(mock_out_store_directory):
runner = Runner('foo/bar')
ret = runner.cmd_runner