Open files as UTF-8

This commit is contained in:
Michał Sochoń 2018-03-26 12:00:48 +02:00
parent 16ff195820
commit 54c0f8c937
6 changed files with 10 additions and 8 deletions

View file

@ -12,9 +12,9 @@ def _assert_parseable_in_old_pre_commit(hooks):
def test_legacy_hooks():
with io.open('hooks.yaml') as legacy_file:
with io.open('hooks.yaml', encoding='UTF-8') as legacy_file:
legacy = yaml.load(legacy_file.read())
with io.open('.pre-commit-hooks.yaml') as hooks_file:
with io.open('.pre-commit-hooks.yaml', encoding='UTF-8') as hooks_file:
hooks = yaml.load(hooks_file.read())
# The same set of hooks should be defined in both files