mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 16:44:42 +04:00
Repository now parses languages and manifests
This commit is contained in:
parent
d77d01cd22
commit
5ca8f4ffa8
8 changed files with 114 additions and 23 deletions
|
|
@ -64,4 +64,9 @@ def test_passes_array_schema(array_validator):
|
|||
|
||||
def test_raises_when_additional_validation_fails(additional_validator):
|
||||
with pytest.raises(AdditionalValidatorError):
|
||||
additional_validator()
|
||||
additional_validator()
|
||||
|
||||
|
||||
def test_returns_object_after_validating(noop_validator):
|
||||
ret = noop_validator('tests/data/array_yaml_file.yaml')
|
||||
assert ret == ['foo', 'bar']
|
||||
|
|
@ -29,7 +29,7 @@ def test_additional_manifest_check_raises_for_bad_language():
|
|||
@pytest.mark.parametrize(('obj'), (
|
||||
[{}],
|
||||
[{'language': 'python'}],
|
||||
[{'language': 'python>2.6'}],
|
||||
[{'language': 'ruby'}],
|
||||
))
|
||||
def test_additional_manifest_check_is_ok_with_missing_language(obj):
|
||||
additional_manifest_check(obj)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue