From 23c1c02bf181df014067a845abd6d9914422c437 Mon Sep 17 00:00:00 2001 From: Haoyu Yang Date: Sun, 8 Dec 2024 22:10:08 +0800 Subject: [PATCH] fix test in binary mode windows, and OS would overwrite the line separator --- tests/test_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_io.py b/tests/test_io.py index 073596296..929eac4dd 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -250,7 +250,7 @@ def test_warnings(self, extension): if extension == ".txt": assert f.readline() == content else: - assert f.readline().decode("utf-8") == content + assert f.readline().decode("utf-8").rstrip() == content.rstrip() # Implicit `mode` warning with (