Skip to content

Commit d4c18af

Browse files
Backport PR #39494: CI: update for numpy 1.20 (#39532)
Co-authored-by: jbrockmendel <[email protected]>
1 parent 6418c4d commit d4c18af

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.numpy import is_numpy_dev
1110
import pandas.util._test_decorators as td
1211

1312
import pandas as pd
@@ -981,7 +980,6 @@ def test_loc_setitem_empty_append_single_value(self):
981980
df.loc[0, "x"] = expected.loc[0, "x"]
982981
tm.assert_frame_equal(df, expected)
983982

984-
@pytest.mark.xfail(is_numpy_dev, reason="gh-35481")
985983
def test_loc_setitem_empty_append_raises(self):
986984
# GH6173, various appends to an empty dataframe
987985

@@ -995,7 +993,12 @@ def test_loc_setitem_empty_append_raises(self):
995993
with pytest.raises(KeyError, match=msg):
996994
df.loc[[0, 1], "x"] = data
997995

998-
msg = "cannot copy sequence with size 2 to array axis with dimension 0"
996+
msg = "|".join(
997+
[
998+
"cannot copy sequence with size 2 to array axis with dimension 0",
999+
r"could not broadcast input array from shape \(2,\) into shape \(0,\)",
1000+
]
1001+
)
9991002
with pytest.raises(ValueError, match=msg):
10001003
df.loc[0:2, "x"] = data
10011004

0 commit comments

Comments
 (0)