mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Remove more properties from Runner
This commit is contained in:
parent
8f6fe8c9e6
commit
b87c4fd8cc
5 changed files with 43 additions and 87 deletions
|
|
@ -5,7 +5,6 @@ import os.path
|
|||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit.runner import Runner
|
||||
from pre_commit.util import cmd_output
|
||||
from testing.fixtures import git_dir
|
||||
from testing.util import cwd
|
||||
|
||||
|
|
@ -43,19 +42,3 @@ def test_config_file_path():
|
|||
runner = Runner(os.path.join('foo', 'bar'), C.CONFIG_FILE)
|
||||
expected_path = os.path.join('foo', 'bar', C.CONFIG_FILE)
|
||||
assert runner.config_file_path == expected_path
|
||||
|
||||
|
||||
def test_pre_commit_path(in_tmpdir):
|
||||
path = os.path.join('foo', 'bar')
|
||||
cmd_output('git', 'init', path)
|
||||
runner = Runner(path, C.CONFIG_FILE)
|
||||
expected_path = os.path.join(path, '.git', 'hooks', 'pre-commit')
|
||||
assert runner.pre_commit_path == expected_path
|
||||
|
||||
|
||||
def test_pre_push_path(in_tmpdir):
|
||||
path = os.path.join('foo', 'bar')
|
||||
cmd_output('git', 'init', path)
|
||||
runner = Runner(path, C.CONFIG_FILE)
|
||||
expected_path = os.path.join(path, '.git', 'hooks', 'pre-push')
|
||||
assert runner.pre_push_path == expected_path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue