Open file explicitly with UTF-8 so it works on Windows, too

This commit is contained in:
Łukasz Langa 2020-08-20 19:21:40 +02:00
parent 05cc7ede6a
commit bc71685d22

View File

@ -2062,7 +2062,7 @@ async def test_blackd_response_black_version_header(self) -> None:
self.assertIsNotNone(response.headers.get(blackd.BLACK_VERSION_HEADER))
with open(black.__file__, "r") as _bf:
with open(black.__file__, "r", encoding="utf-8") as _bf:
black_source_lines = _bf.readlines()