From 2fa26fd1fdaaef67b9cff812006b21fe0a76ebe9 Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Sat, 20 Jan 2024 01:20:40 +0100 Subject: [PATCH] =?UTF-8?q?Backport=20PR=20#56967=20on=20branch=202.2.x=20?= =?UTF-8?q?(CI:=20Adjust=20pyarrow=20depr=20warning=20to=20account=20for?= =?UTF-8?q?=20different=20newlines=20on=20=E2=80=A6)=20(#56969)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport PR #56967: CI: Adjust pyarrow depr warning to account for different newlines on … Co-authored-by: Thomas Li <47963215+lithomas1@users.noreply.github.com> --- pandas/tests/test_common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/tests/test_common.py b/pandas/tests/test_common.py index fe24755e8cc23..4af71be11fe6b 100644 --- a/pandas/tests/test_common.py +++ b/pandas/tests/test_common.py @@ -286,4 +286,7 @@ def test_pyarrow_missing_warn(module): please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466 """ # noqa: E501 stderr_msg = response.stderr.decode("utf-8") - assert msg in stderr_msg, stderr_msg + # Split by \n to avoid \r\n vs \n differences on Windows/Unix + # https://stackoverflow.com/questions/11989501/replacing-r-n-with-n + stderr_msg = "\n".join(stderr_msg.splitlines()) + assert msg in stderr_msg