Skip to content

Commit 435d137

Browse files
authored
TST: update for numpy 1.20 (#39494)
1 parent 8d70a09 commit 435d137

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pandas/tests/indexing/test_loc.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import numpy as np
88
import pytest
99

10-
from pandas.compat import is_numpy_dev
1110
import pandas.util._test_decorators as td
1211

1312
import pandas as pd
@@ -978,7 +977,6 @@ def test_loc_setitem_empty_append_single_value(self):
978977
df.loc[0, "x"] = expected.loc[0, "x"]
979978
tm.assert_frame_equal(df, expected)
980979

981-
@pytest.mark.xfail(is_numpy_dev, reason="gh-35481")
982980
def test_loc_setitem_empty_append_raises(self):
983981
# GH6173, various appends to an empty dataframe
984982

@@ -992,7 +990,12 @@ def test_loc_setitem_empty_append_raises(self):
992990
with pytest.raises(KeyError, match=msg):
993991
df.loc[[0, 1], "x"] = data
994992

995-
msg = "cannot copy sequence with size 2 to array axis with dimension 0"
993+
msg = "|".join(
994+
[
995+
"cannot copy sequence with size 2 to array axis with dimension 0",
996+
r"could not broadcast input array from shape \(2,\) into shape \(0,\)",
997+
]
998+
)
996999
with pytest.raises(ValueError, match=msg):
9971000
df.loc[0:2, "x"] = data
9981001

0 commit comments

Comments
 (0)