manifest -> hooks

This commit is contained in:
Anthony Sottile
2014-03-30 13:12:40 -07:00
parent d4c9f9075e
commit c62c1a3b51
8 changed files with 8 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ CONFIG_FILE = '.pre-commit-config.yaml'
HOOKS_WORKSPACE = '.pre-commit-files'
MANIFEST_FILE = 'manifest.yaml'
MANIFEST_FILE = 'hooks.yaml'
SUPPORTED_LANGUAGES = set([
'python',

View File

@@ -17,7 +17,7 @@ class AdditionalValidatorError(ValueError): pass
@pytest.fixture
def noop_validator():
return get_validator('example_manifest.yaml', {}, ValueError)
return get_validator('example_hooks.yaml', {}, ValueError)
@pytest.fixture
@@ -31,7 +31,7 @@ def additional_validator():
raise AdditionalValidatorError
return get_validator(
'example_manifest.yaml',
'example_hooks.yaml',
{},
ValueError,
additional_validation_strategy=raises_always,
@@ -52,7 +52,7 @@ def test_defaults_to_backup_filename(noop_validator):
with mock.patch.object(__builtin__, 'open', side_effect=open) as mock_open:
noop_validator()
mock_open.assert_called_once_with(
os.path.join(git.get_root(), 'example_manifest.yaml'), 'r',
os.path.join(git.get_root(), 'example_hooks.yaml'), 'r',
)

View File

@@ -10,7 +10,7 @@ from pre_commit.clientlib.validate_manifest import run
def test_returns_0_for_valid_manifest():
assert run(['example_manifest.yaml']) == 0
assert run(['example_hooks.yaml']) == 0
def test_returns_0_for_our_manifest():

View File

@@ -22,7 +22,7 @@ def get_files_matching_func():
'pre_commit/run.py',
'pre_commit/git.py',
'im_a_file_that_doesnt_exist.py',
'manifest.yaml',
'hooks.yaml',
)
return git.get_files_matching(get_filenames)
@@ -33,7 +33,7 @@ def test_get_files_matching_base(get_files_matching_func):
assert ret == set([
'pre_commit/run.py',
'pre_commit/git.py',
'manifest.yaml',
'hooks.yaml',
])
@@ -47,7 +47,7 @@ def test_get_files_matching_total_match(get_files_matching_func):
def test_does_search_instead_of_match(get_files_matching_func):
ret = get_files_matching_func('\.yaml$')
assert ret == set(['manifest.yaml'])
assert ret == set(['hooks.yaml'])
def test_does_not_include_deleted_fileS(get_files_matching_func):