Skip to content

Commit 76a122e

Browse files
committed
Update python test_add_frame catch to better reflect issues across different enviroments
1 parent 3d3a2a6 commit 76a122e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pandas/tests/arrays/string_/test_string.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,12 @@ def test_add_strings(dtype):
278278

279279
@pytest.mark.xfail(reason="GH-28527")
280280
def test_add_frame(request, dtype):
281-
# "str[python]" actually safely adds but with the wrong dtype
282-
# result = <StringDtype(na_value=nan)>
283-
# expected = <StringDtype(storage='python', na_value=nan)>
281+
if dtype.storage == "python":
282+
# Inconsistent behavior between different versions of the python engine.
283+
# Some return correctly, some return but with the wrong dtype
284+
# Others just fail, we are blanket failing all
285+
mark = pytest.mark.xfail(reason="[XPASS(strict)] GH-28527")
286+
request.node.applymarker(mark)
284287
arr = pd.array(["a", "b", np.nan, np.nan], dtype=dtype)
285288
df = pd.DataFrame([["x", np.nan, "y", np.nan]])
286289
assert arr.__add__(df) is NotImplemented

0 commit comments

Comments
 (0)