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 import is_numpy_dev
11
10
import pandas .util ._test_decorators as td
12
11
13
12
import pandas as pd
@@ -978,7 +977,6 @@ def test_loc_setitem_empty_append_single_value(self):
978
977
df .loc [0 , "x" ] = expected .loc [0 , "x" ]
979
978
tm .assert_frame_equal (df , expected )
980
979
981
- @pytest .mark .xfail (is_numpy_dev , reason = "gh-35481" )
982
980
def test_loc_setitem_empty_append_raises (self ):
983
981
# GH6173, various appends to an empty dataframe
984
982
@@ -992,7 +990,12 @@ def test_loc_setitem_empty_append_raises(self):
992
990
with pytest .raises (KeyError , match = msg ):
993
991
df .loc [[0 , 1 ], "x" ] = data
994
992
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
+ )
996
999
with pytest .raises (ValueError , match = msg ):
997
1000
df .loc [0 :2 , "x" ] = data
998
1001
You can’t perform that action at this time.
0 commit comments