mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-29 10:16:52 +00:00
Always load the README as UTF-8
This commit is contained in:
parent
e80813e7e9
commit
b312063051
1 changed files with 4 additions and 2 deletions
|
|
@ -7,7 +7,9 @@ import yaml
|
|||
|
||||
|
||||
def test_readme_contains_all_hooks():
|
||||
readme_contents = io.open('README.md').read()
|
||||
hooks = yaml.load(io.open('hooks.yaml').read())
|
||||
with io.open('README.md', encoding='UTF-8') as f:
|
||||
readme_contents = f.read()
|
||||
with io.open('.pre-commit-hooks.yaml', encoding='UTF-8') as f:
|
||||
hooks = yaml.load(f)
|
||||
for hook in hooks:
|
||||
assert '`{}`'.format(hook['id']) in readme_contents
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue