@@ -834,7 +834,6 @@ def test_append_preserve_index_name(self):
834
834
@pytest .mark .parametrize ("df_columns" , [
835
835
pd .RangeIndex (3 ),
836
836
pd .CategoricalIndex ('A B C' .split ()),
837
- pd .CategoricalIndex ('A B C' .split (), ordered = True ),
838
837
pd .MultiIndex .from_arrays (['A B C' .split (), 'D E F' .split ()]),
839
838
pd .IntervalIndex .from_breaks ([0 , 1 , 2 , 3 ]),
840
839
pd .DatetimeIndex ([dt .datetime (2013 , 1 , 3 , 0 , 0 ),
@@ -913,10 +912,8 @@ def test_append_multi_index_raises(self, other_type):
913
912
914
913
df = pd .DataFrame ([[1 , 2 , 3 ], [4 , 5 , 6 ]], columns = mi )
915
914
ser = pd .Series ([7 , 8 , 9 ], index = other_type , name = 2 )
916
- if isinstance (other_type , pd .IntervalIndex ):
917
- pytest .raises (ValueError , df .append , ser )
918
- else :
919
- pytest .raises (TypeError , df .append , ser )
915
+ with pytest .raises (TypeError ):
916
+ df .append (ser )
920
917
921
918
df = pd .DataFrame ([[1 , 2 , 3 ], [4 , 5 , 6 ]], columns = other_type )
922
919
ser = pd .Series ([7 , 8 , 9 ], index = mi , name = 2 )
@@ -947,7 +944,7 @@ def test_append_interval_index_raises(self, other_type):
947
944
948
945
df = pd .DataFrame ([[1 , 2 , 3 ], [4 , 5 , 6 ]], columns = other_type )
949
946
ser = pd .Series ([7 , 8 , 9 ], index = ii , name = 2 )
950
- with pytest .raises (ValueError ):
947
+ with pytest .raises (TypeError ):
951
948
df .append (ser )
952
949
953
950
def test_append_dtype_coerce (self ):
0 commit comments