@@ -340,14 +340,17 @@ def test_constructor_empty_special(self, empty, klass):
340340 "index" ,
341341 [
342342 "datetime" ,
343- "float" ,
344- "int" ,
343+ "float64" ,
344+ "float32" ,
345+ "int64" ,
346+ "int32" ,
345347 "period" ,
346348 "range" ,
347349 "repeats" ,
348350 "timedelta" ,
349351 "tuples" ,
350- "uint" ,
352+ "uint64" ,
353+ "uint32" ,
351354 ],
352355 indirect = True ,
353356 )
@@ -375,7 +378,11 @@ def test_view_with_args_object_array_raises(self, index):
375378 with pytest .raises (TypeError , match = msg ):
376379 index .view ("i8" )
377380
378- @pytest .mark .parametrize ("index" , ["int" , "range" ], indirect = True )
381+ @pytest .mark .parametrize (
382+ "index" ,
383+ ["int64" , "int32" , "range" ],
384+ indirect = True ,
385+ )
379386 def test_astype (self , index ):
380387 casted = index .astype ("i8" )
381388
@@ -474,7 +481,11 @@ def test_fancy(self, simple_index):
474481 for i in sl :
475482 assert i == sl [sl .get_loc (i )]
476483
477- @pytest .mark .parametrize ("index" , ["string" , "int" , "float" ], indirect = True )
484+ @pytest .mark .parametrize (
485+ "index" ,
486+ ["string" , "int64" , "int32" , "uint64" , "uint32" , "float64" , "float32" ],
487+ indirect = True ,
488+ )
478489 @pytest .mark .parametrize ("dtype" , [np .int_ , np .bool_ ])
479490 def test_empty_fancy (self , index , dtype ):
480491 empty_arr = np .array ([], dtype = dtype )
@@ -483,7 +494,11 @@ def test_empty_fancy(self, index, dtype):
483494 assert index [[]].identical (empty_index )
484495 assert index [empty_arr ].identical (empty_index )
485496
486- @pytest .mark .parametrize ("index" , ["string" , "int" , "float" ], indirect = True )
497+ @pytest .mark .parametrize (
498+ "index" ,
499+ ["string" , "int64" , "int32" , "uint64" , "uint32" , "float64" , "float32" ],
500+ indirect = True ,
501+ )
487502 def test_empty_fancy_raises (self , index ):
488503 # DatetimeIndex is excluded, because it overrides getitem and should
489504 # be tested separately.
@@ -638,9 +653,13 @@ def test_append_empty_preserve_name(self, name, expected):
638653 ("bool-object" , False ),
639654 ("bool-dtype" , False ),
640655 ("categorical" , False ),
641- ("int" , True ),
656+ ("int64" , True ),
657+ ("int32" , True ),
658+ ("uint64" , True ),
659+ ("uint32" , True ),
642660 ("datetime" , False ),
643- ("float" , True ),
661+ ("float64" , True ),
662+ ("float32" , True ),
644663 ],
645664 indirect = ["index" ],
646665 )
@@ -654,9 +673,13 @@ def test_is_numeric(self, index, expected):
654673 ("bool-object" , True ),
655674 ("bool-dtype" , False ),
656675 ("categorical" , False ),
657- ("int" , False ),
676+ ("int64" , False ),
677+ ("int32" , False ),
678+ ("uint64" , False ),
679+ ("uint32" , False ),
658680 ("datetime" , False ),
659- ("float" , False ),
681+ ("float64" , False ),
682+ ("float32" , False ),
660683 ],
661684 indirect = ["index" ],
662685 )
@@ -700,7 +723,9 @@ def test_logical_compat(self, op, simple_index):
700723 index = simple_index
701724 assert getattr (index , op )() == getattr (index .values , op )()
702725
703- @pytest .mark .parametrize ("index" , ["string" , "int" , "float" ], indirect = True )
726+ @pytest .mark .parametrize (
727+ "index" , ["string" , "int64" , "int32" , "float64" , "float32" ], indirect = True
728+ )
704729 def test_drop_by_str_label (self , index ):
705730 n = len (index )
706731 drop = index [list (range (5 , 10 ))]
@@ -713,13 +738,17 @@ def test_drop_by_str_label(self, index):
713738 expected = index [1 :]
714739 tm .assert_index_equal (dropped , expected )
715740
716- @pytest .mark .parametrize ("index" , ["string" , "int" , "float" ], indirect = True )
741+ @pytest .mark .parametrize (
742+ "index" , ["string" , "int64" , "int32" , "float64" , "float32" ], indirect = True
743+ )
717744 @pytest .mark .parametrize ("keys" , [["foo" , "bar" ], ["1" , "bar" ]])
718745 def test_drop_by_str_label_raises_missing_keys (self , index , keys ):
719746 with pytest .raises (KeyError , match = "" ):
720747 index .drop (keys )
721748
722- @pytest .mark .parametrize ("index" , ["string" , "int" , "float" ], indirect = True )
749+ @pytest .mark .parametrize (
750+ "index" , ["string" , "int64" , "int32" , "float64" , "float32" ], indirect = True
751+ )
723752 def test_drop_by_str_label_errors_ignore (self , index ):
724753 n = len (index )
725754 drop = index [list (range (5 , 10 ))]
@@ -940,7 +969,16 @@ def test_slice_keep_name(self):
940969
941970 @pytest .mark .parametrize (
942971 "index" ,
943- ["string" , "datetime" , "int" , "uint" , "float" ],
972+ [
973+ "string" ,
974+ "datetime" ,
975+ "int64" ,
976+ "int32" ,
977+ "uint64" ,
978+ "uint32" ,
979+ "float64" ,
980+ "float32" ,
981+ ],
944982 indirect = True ,
945983 )
946984 def test_join_self (self , index , join_type ):
0 commit comments