@@ -834,13 +834,14 @@ 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 ),
837
838
pd .MultiIndex .from_arrays (['A B C' .split (), 'D E F' .split ()]),
838
839
pd .IntervalIndex .from_breaks ([0 , 1 , 2 , 3 ]),
839
840
pd .DatetimeIndex ([dt .datetime (2013 , 1 , 3 , 0 , 0 ),
840
841
dt .datetime (2013 , 1 , 3 , 6 , 10 ),
841
842
dt .datetime (2013 , 1 , 3 , 7 , 12 )]),
842
843
pd .Index ([1 , 2 , 3 ]),
843
- ], ids = lambda x : x . __class__ . __name__ )
844
+ ], ids = lambda x : str ( x . dtype ) )
844
845
def test_append_same_columns_type (self , df_columns ):
845
846
# GH18359
846
847
@@ -870,10 +871,11 @@ def test_append_same_columns_type(self, df_columns):
870
871
pd .Index ([4 , 5 , 6 ]),
871
872
pd .Index ([7.5 , 8.5 , 9.5 ]),
872
873
pd .CategoricalIndex ('A B C' .split ()),
874
+ # pd.CategoricalIndex('A B C'.split(), ordered=True),
873
875
pd .DatetimeIndex ([dt .datetime (2013 , 1 , 3 , 0 , 0 ),
874
876
dt .datetime (2013 , 1 , 3 , 6 , 10 ),
875
877
dt .datetime (2013 , 1 , 3 , 7 , 12 )]),
876
- ], r = 2 ), ids = lambda x : x . __class__ . __name__ )
878
+ ], r = 2 ), ids = lambda x : str ( x . dtype ) )
877
879
def test_append_different_columns_types (self , df_columns , series_index ):
878
880
# GH18359
879
881
# see also tests 'test_append_multi_index_raises' and
@@ -895,12 +897,13 @@ def test_append_different_columns_types(self, df_columns, series_index):
895
897
@pytest .mark .parametrize ("other_type" , [
896
898
pd .RangeIndex (3 ),
897
899
pd .CategoricalIndex ('A B C' .split ()),
900
+ pd .CategoricalIndex ('A B C' .split (), ordered = True ),
898
901
pd .IntervalIndex .from_breaks ([0 , 1 , 2 , 3 ]),
899
902
pd .DatetimeIndex ([dt .datetime (2013 , 1 , 3 , 0 , 0 ),
900
903
dt .datetime (2013 , 1 , 3 , 6 , 10 ),
901
904
dt .datetime (2013 , 1 , 3 , 7 , 12 )]),
902
905
pd .Index ([4 , 5 , 6 ]),
903
- ], ids = lambda x : x . __class__ . __name__ )
906
+ ], ids = lambda x : str ( x . dtype ) )
904
907
def test_append_multi_index_raises (self , other_type ):
905
908
# GH18359
906
909
# .append will raise if MultiIndex appends or is appended to a
@@ -923,12 +926,13 @@ def test_append_multi_index_raises(self, other_type):
923
926
@pytest .mark .parametrize ("other_type" , [
924
927
pd .RangeIndex (3 ),
925
928
pd .CategoricalIndex ('A B C' .split ()),
929
+ pd .CategoricalIndex ('A B C' .split (), ordered = True ),
926
930
pd .MultiIndex .from_arrays (['A B C' .split (), 'D E F' .split ()]),
927
931
pd .DatetimeIndex ([dt .datetime (2013 , 1 , 3 , 0 , 0 ),
928
932
dt .datetime (2013 , 1 , 3 , 6 , 10 ),
929
933
dt .datetime (2013 , 1 , 3 , 7 , 12 )]),
930
934
pd .Index ([4 , 5 , 6 ]),
931
- ], ids = lambda x : x . __class__ . __name__ )
935
+ ], ids = lambda x : str ( x . dtype ) )
932
936
def test_append_interval_index_raises (self , other_type ):
933
937
# GH18359
934
938
# .append will raise if IntervalIndex appends or is appended to a
0 commit comments