mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-09 21:04:17 +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():
|
def test_readme_contains_all_hooks():
|
||||||
readme_contents = io.open('README.md').read()
|
with io.open('README.md', encoding='UTF-8') as f:
|
||||||
hooks = yaml.load(io.open('hooks.yaml').read())
|
readme_contents = f.read()
|
||||||
|
with io.open('.pre-commit-hooks.yaml', encoding='UTF-8') as f:
|
||||||
|
hooks = yaml.load(f)
|
||||||
for hook in hooks:
|
for hook in hooks:
|
||||||
assert '`{}`'.format(hook['id']) in readme_contents
|
assert '`{}`'.format(hook['id']) in readme_contents
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue