From bc4fb26606e1e7821525dbb617f35f96cf3b6be3 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Sat, 13 May 2023 14:28:44 +0100 Subject: Specify file encoding so tests pass on windows This file has non-cp1252 characters, which is the default on windows, so fails to read the file. --- pydis_site/apps/api/tests/test_rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/apps/api') diff --git a/pydis_site/apps/api/tests/test_rules.py b/pydis_site/apps/api/tests/test_rules.py index 662fb8e9..14412b90 100644 --- a/pydis_site/apps/api/tests/test_rules.py +++ b/pydis_site/apps/api/tests/test_rules.py @@ -56,7 +56,7 @@ class RuleCorrectnessTests(AuthenticatedAPITestCase): ) markdown_rules = [] - for line in markdown_rules_path.read_text().splitlines(): + for line in markdown_rules_path.read_text(encoding="utf8").splitlines(): matches = self.markdown_rule_re.match(line) if matches is not None: markdown_rules.append(matches.group(1)) -- cgit v1.2.3