Skip to content

Commit b312063

Browse files
committed
Always load the README as UTF-8
1 parent e80813e commit b312063

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/readme_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88

99
def test_readme_contains_all_hooks():
10-
readme_contents = io.open('README.md').read()
11-
hooks = yaml.load(io.open('hooks.yaml').read())
10+
with io.open('README.md', encoding='UTF-8') as f:
11+
readme_contents = f.read()
12+
with io.open('.pre-commit-hooks.yaml', encoding='UTF-8') as f:
13+
hooks = yaml.load(f)
1214
for hook in hooks:
1315
assert '`{}`'.format(hook['id']) in readme_contents

0 commit comments

Comments
 (0)