@@ -995,21 +995,21 @@ def test_append(self):
995
995
result2 = indices [0 ].append (indices [1 ])
996
996
tm .assert_index_equal (result2 , expected , exact = True )
997
997
998
- def test_max_min ( self ):
999
- params = [(0 , 400 , 3 ), (500 , 0 , - 6 ), (- 10 ** 6 , 10 ** 6 , 4 ),
1000
- (10 ** 6 , - 10 ** 6 , - 4 ), (0 , 10 , 20 )]
1001
- for start , stop , step in params :
1002
- idx = RangeIndex ( start , stop , step )
1003
-
1004
- expected = idx ._int64index .max ()
1005
- result = idx .max ()
1006
- assert result == expected
998
+ @ pytest . mark . parametrize ( 'start,stop,step' ,
999
+ [(0 , 400 , 3 ), (500 , 0 , - 6 ), (- 10 ** 6 , 10 ** 6 , 4 ),
1000
+ (10 ** 6 , - 10 ** 6 , - 4 ), (0 , 10 , 20 )])
1001
+ def test_max_min ( self , start , stop , step ) :
1002
+ # GH17607
1003
+ idx = RangeIndex ( start , stop , step )
1004
+ expected = idx ._int64index .max ()
1005
+ result = idx .max ()
1006
+ assert result == expected
1007
1007
1008
- expected = idx ._int64index .min ()
1009
- result = idx .min ()
1010
- assert result == expected
1008
+ expected = idx ._int64index .min ()
1009
+ result = idx .min ()
1010
+ assert result == expected
1011
1011
1012
1012
# empty
1013
- idx = RangeIndex (0 , 1 , - 1 )
1013
+ idx = RangeIndex (start , stop , - step )
1014
1014
assert isna (idx .max ())
1015
1015
assert isna (idx .min ())
0 commit comments