From 691fc88fbd7b570017bbc05fa77754b24c1fa997 Mon Sep 17 00:00:00 2001 From: Natalia Mokeeva <91160475+natmokval@users.noreply.github.com> Date: Mon, 8 Apr 2024 23:34:15 +0200 Subject: [PATCH] Backport PR #58181 on branch 2.2.x (CI: correct error msg in test_view_index) (#58187) Backport PR #58181: CI: correct error msg in `test_view_index` --- pandas/tests/indexes/test_base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index 1fa48f98942c2..b7204d7af1cbb 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -358,7 +358,10 @@ def test_view_with_args_object_array_raises(self, index): with pytest.raises(NotImplementedError, match="i8"): index.view("i8") else: - msg = "Cannot change data-type for object array" + msg = ( + "Cannot change data-type for array of references|" + "Cannot change data-type for object array|" + ) with pytest.raises(TypeError, match=msg): index.view("i8")