Skip to content

Commit 2dfb4bf

Browse files
committed
Addressed errors from changes in som tests
1 parent 1179098 commit 2dfb4bf

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
@@ -8445,7 +8445,7 @@ def _maybe_align_series_as_frame(self, series: Series, axis: AxisInt):
84458445
rvalues = series._values
84468446
if isinstance(rvalues, PeriodArray):
84478447
return series
8448-
if not isinstance(rvalues, (np.ndarray,)) and rvalues.dtype not in (
8448+
if not isinstance(rvalues, np.ndarray) and rvalues.dtype not in (
84498449
"datetime64[ns]",
84508450
"timedelta64[ns]",
84518451
):

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
@@ -254,7 +254,7 @@ def test_mul(dtype):
254254
tm.assert_extension_array_equal(result, expected)
255255

256256

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

0 commit comments

Comments
 (0)