Skip to content

Commit 928d221

Browse files
Backport PR #60636 on branch 2.3.x (TST(string dtype): Resolve xfail with apply returning an ndarray) (#60643)
Backport PR #60636: TST(string dtype): Resolve xfail with apply returning an ndarray Co-authored-by: Richard Shadrach <[email protected]>
1 parent c24ac2f commit 928d221

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pandas/tests/frame/methods/test_dtypes.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import numpy as np
44
import pytest
55

6-
from pandas._config import using_string_dtype
7-
86
from pandas.core.dtypes.dtypes import DatetimeTZDtype
97

108
import pandas as pd
@@ -144,13 +142,9 @@ def test_dtypes_timedeltas(self):
144142
)
145143
tm.assert_series_equal(result, expected)
146144

147-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
148145
def test_frame_apply_np_array_return_type(self, using_infer_string):
149146
# GH 35517
150147
df = DataFrame([["foo"]])
151148
result = df.apply(lambda col: np.array("bar"))
152-
if using_infer_string:
153-
expected = Series([np.array(["bar"])])
154-
else:
155-
expected = Series(["bar"])
149+
expected = Series(np.array("bar"))
156150
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)