File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 7
7
import numpy as np
8
8
import pytest
9
9
10
- from pandas .compat .numpy import is_numpy_dev
11
10
import pandas .util ._test_decorators as td
12
11
13
12
import pandas as pd
@@ -981,7 +980,6 @@ def test_loc_setitem_empty_append_single_value(self):
981
980
df .loc [0 , "x" ] = expected .loc [0 , "x" ]
982
981
tm .assert_frame_equal (df , expected )
983
982
984
- @pytest .mark .xfail (is_numpy_dev , reason = "gh-35481" )
985
983
def test_loc_setitem_empty_append_raises (self ):
986
984
# GH6173, various appends to an empty dataframe
987
985
@@ -995,7 +993,12 @@ def test_loc_setitem_empty_append_raises(self):
995
993
with pytest .raises (KeyError , match = msg ):
996
994
df .loc [[0 , 1 ], "x" ] = data
997
995
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
+ )
999
1002
with pytest .raises (ValueError , match = msg ):
1000
1003
df .loc [0 :2 , "x" ] = data
1001
1004
You can’t perform that action at this time.
0 commit comments