Skip to content

Commit eb753a2

Browse files
committed
Addressed errors from changes in som tests
1 parent 3207057 commit eb753a2

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

pandas/core/frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8470,7 +8470,7 @@ def _maybe_align_series_as_frame(self, series: Series, axis: AxisInt):
84708470
rvalues = series._values
84718471
if isinstance(rvalues, PeriodArray):
84728472
return series
8473-
if not isinstance(rvalues, (np.ndarray,)) and rvalues.dtype not in (
8473+
if not isinstance(rvalues, np.ndarray) and rvalues.dtype not in (
84748474
"datetime64[ns]",
84758475
"timedelta64[ns]",
84768476
):

pandas/tests/arithmetic/test_period.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,12 +1361,8 @@ def test_period_add_timestamp_raises(self, box_with_array):
13611361
arr + ts
13621362
with pytest.raises(TypeError, match=msg):
13631363
ts + arr
1364-
if box_with_array is pd.DataFrame:
1365-
# TODO: before implementing resolution-inference we got the same
1366-
# message with DataFrame and non-DataFrame. Why did that change?
1367-
msg = "cannot add PeriodArray and Timestamp"
1368-
else:
1369-
msg = "cannot add PeriodArray and DatetimeArray"
1364+
msg = "cannot add PeriodArray and DatetimeArray"
1365+
print(box_with_array)
13701366
with pytest.raises(TypeError, match=msg):
13711367
arr + Series([ts])
13721368
with pytest.raises(TypeError, match=msg):

pandas/tests/arrays/string_/test_string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def test_mul(dtype):
249249
tm.assert_extension_array_equal(result, expected)
250250

251251

252-
@pytest.mark.xfail(reason="GH-28527")
252+
# @pytest.mark.xfail(reason="GH-28527")
253253
def test_add_strings(dtype):
254254
arr = pd.array(["a", "b", "c", "d"], dtype=dtype)
255255
df = pd.DataFrame([["t", "y", "v", "w"]], dtype=object)

0 commit comments

Comments
 (0)