From c5860c4eebcf8fa36708390adecbafb42a08489c Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Wed, 25 Oct 2023 17:16:03 +0100 Subject: [PATCH] tests/test_font.py: address problem with test_2608() on Github Windows machines. --- tests/test_font.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_font.py b/tests/test_font.py index 0b1d90133..ddd1ffe60 100644 --- a/tests/test_font.py +++ b/tests/test_font.py @@ -51,4 +51,9 @@ def test_2608(): f.write(text.encode('utf8')) with open(os.path.abspath(f'{__file__}/../resources/test_2608_expected'), 'rb') as f: expected = f.read().decode('utf8') + # Github windows x32 seems to insert \r characters; maybe something to + # do with the Python installation's line endings settings. + expected = expected.replace('\r', '') + print(f'test_2608(): {text.encode("utf8")=}') + print(f'test_2608(): {expected.encode("utf8")=}') assert text == expected