From 3ab4b88586ab81deb3559d43e79ad7c7856ec383 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 1 Dec 2020 21:37:59 +0100 Subject: [PATCH] Backport PR #38209: CI/TST: fix CI with numpy dev for changed error message / dev version --- pandas/tests/series/indexing/test_indexing.py | 3 +-- pandas/tests/util/test_show_versions.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pandas/tests/series/indexing/test_indexing.py b/pandas/tests/series/indexing/test_indexing.py index 3b66939d9ddd2..9d5491fe2f5fc 100644 --- a/pandas/tests/series/indexing/test_indexing.py +++ b/pandas/tests/series/indexing/test_indexing.py @@ -369,8 +369,7 @@ def test_2d_to_1d_assignment_raises(): msg = "|".join( [ - r"shape mismatch: value array of shape \(2,2\) could not be " - r"broadcast to indexing result of shape \(2,\)", + r"shape mismatch: value array of shape \(2,2\)", r"cannot reshape array of size 4 into shape \(2,\)", ] ) diff --git a/pandas/tests/util/test_show_versions.py b/pandas/tests/util/test_show_versions.py index fe5fc3e21d960..4ea3ebe5000ad 100644 --- a/pandas/tests/util/test_show_versions.py +++ b/pandas/tests/util/test_show_versions.py @@ -39,7 +39,7 @@ def test_show_versions(capsys): assert re.search(r"commit\s*:\s[0-9a-f]{40}\n", result) # check required dependency - assert re.search(r"numpy\s*:\s([0-9\.\+a-f]|dev)+\n", result) + assert re.search(r"numpy\s*:\s([0-9\.\+a-f\_]|dev)+\n", result) # check optional dependency assert re.search(r"pyarrow\s*:\s([0-9\.]+|None)\n", result)