From: Ɓukasz Langa Date: Thu, 20 Aug 2020 17:21:40 +0000 (+0200) Subject: Open file explicitly with UTF-8 so it works on Windows, too X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/bc71685d229baa28fdee8bb1928b82e9f632e0a4?hp=05cc7ede6a6e4f07e621fdd7a3541a5d39f6f156 Open file explicitly with UTF-8 so it works on Windows, too --- diff --git a/tests/test_black.py b/tests/test_black.py index 7793b0e..f89f140 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -2062,7 +2062,7 @@ class BlackDTestCase(AioHTTPTestCase): 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()