@@ -834,13 +834,14 @@ def test_append_preserve_index_name(self):
834834 @pytest .mark .parametrize ("df_columns" , [
835835 pd .RangeIndex (3 ),
836836 pd .CategoricalIndex ('A B C' .split ()),
837+ pd .CategoricalIndex ('A B C' .split (), ordered = True ),
837838 pd .MultiIndex .from_arrays (['A B C' .split (), 'D E F' .split ()]),
838839 pd .IntervalIndex .from_breaks ([0 , 1 , 2 , 3 ]),
839840 pd .DatetimeIndex ([dt .datetime (2013 , 1 , 3 , 0 , 0 ),
840841 dt .datetime (2013 , 1 , 3 , 6 , 10 ),
841842 dt .datetime (2013 , 1 , 3 , 7 , 12 )]),
842843 pd .Index ([1 , 2 , 3 ]),
843- ], ids = lambda x : x . __class__ . __name__ )
844+ ], ids = lambda x : str ( x . dtype ) )
844845 def test_append_same_columns_type (self , df_columns ):
845846 # GH18359
846847
@@ -870,10 +871,11 @@ def test_append_same_columns_type(self, df_columns):
870871 pd .Index ([4 , 5 , 6 ]),
871872 pd .Index ([7.5 , 8.5 , 9.5 ]),
872873 pd .CategoricalIndex ('A B C' .split ()),
874+ # pd.CategoricalIndex('A B C'.split(), ordered=True),
873875 pd .DatetimeIndex ([dt .datetime (2013 , 1 , 3 , 0 , 0 ),
874876 dt .datetime (2013 , 1 , 3 , 6 , 10 ),
875877 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 ) )
877879 def test_append_different_columns_types (self , df_columns , series_index ):
878880 # GH18359
879881 # see also tests 'test_append_multi_index_raises' and
@@ -895,12 +897,13 @@ def test_append_different_columns_types(self, df_columns, series_index):
895897 @pytest .mark .parametrize ("other_type" , [
896898 pd .RangeIndex (3 ),
897899 pd .CategoricalIndex ('A B C' .split ()),
900+ pd .CategoricalIndex ('A B C' .split (), ordered = True ),
898901 pd .IntervalIndex .from_breaks ([0 , 1 , 2 , 3 ]),
899902 pd .DatetimeIndex ([dt .datetime (2013 , 1 , 3 , 0 , 0 ),
900903 dt .datetime (2013 , 1 , 3 , 6 , 10 ),
901904 dt .datetime (2013 , 1 , 3 , 7 , 12 )]),
902905 pd .Index ([4 , 5 , 6 ]),
903- ], ids = lambda x : x . __class__ . __name__ )
906+ ], ids = lambda x : str ( x . dtype ) )
904907 def test_append_multi_index_raises (self , other_type ):
905908 # GH18359
906909 # .append will raise if MultiIndex appends or is appended to a
@@ -923,12 +926,13 @@ def test_append_multi_index_raises(self, other_type):
923926 @pytest .mark .parametrize ("other_type" , [
924927 pd .RangeIndex (3 ),
925928 pd .CategoricalIndex ('A B C' .split ()),
929+ pd .CategoricalIndex ('A B C' .split (), ordered = True ),
926930 pd .MultiIndex .from_arrays (['A B C' .split (), 'D E F' .split ()]),
927931 pd .DatetimeIndex ([dt .datetime (2013 , 1 , 3 , 0 , 0 ),
928932 dt .datetime (2013 , 1 , 3 , 6 , 10 ),
929933 dt .datetime (2013 , 1 , 3 , 7 , 12 )]),
930934 pd .Index ([4 , 5 , 6 ]),
931- ], ids = lambda x : x . __class__ . __name__ )
935+ ], ids = lambda x : str ( x . dtype ) )
932936 def test_append_interval_index_raises (self , other_type ):
933937 # GH18359
934938 # .append will raise if IntervalIndex appends or is appended to a
0 commit comments