Merge pull request #31 from pre-commit/readme_test

Add test for readme
This commit is contained in:
Anthony Sottile 2015-01-18 09:55:55 -08:00
commit 375913d017

13
tests/readme_test.py Normal file
View file

@ -0,0 +1,13 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import yaml
def test_readme_contains_all_hooks():
readme_contents = io.open('README.md').read()
hooks = yaml.load(io.open('hooks.yaml').read())
for hook in hooks:
assert '`{0}`'.format(hook['id']) in readme_contents