@@ -577,16 +577,19 @@ def test_integers(self):
577
577
result = lib .infer_dtype (arr , skipna = True )
578
578
assert result == "integer"
579
579
580
- @pytest .mark .parametrize ("skipna" , [True , False ])
581
- def test_integer_na (self , skipna ):
580
+ @pytest .mark .parametrize (
581
+ "arr, skipna" ,
582
+ [
583
+ (np .array ([1 , 2 , np .nan , np .nan , 3 ], dtype = "O" ), False ),
584
+ (np .array ([1 , 2 , np .nan , np .nan , 3 ], dtype = "O" ), True ),
585
+ (np .array ([1 , 2 , 3 , np .int64 (4 ), np .int32 (5 ), np .nan ], dtype = "O" ), False ),
586
+ (np .array ([1 , 2 , 3 , np .int64 (4 ), np .int32 (5 ), np .nan ], dtype = "O" ), True ),
587
+ ],
588
+ )
589
+ def test_integer_na (self , arr , skipna , expected ):
582
590
# GH 27392
583
- expected = "integer" if skipna else "integer-na"
584
- arr = np .array ([1 , 2 , np .nan , np .nan , 3 ], dtype = "O" )
585
- result = lib .infer_dtype (arr , skipna = skipna )
586
- assert result == expected
587
-
588
- arr = np .array ([1 , 2 , 3 , np .int64 (4 ), np .int32 (5 ), np .nan ], dtype = "O" )
589
591
result = lib .infer_dtype (arr , skipna = skipna )
592
+ expected = "integer" if skipna else "integer-na"
590
593
assert result == expected
591
594
592
595
def test_deprecation (self ):
0 commit comments