@@ -59,7 +59,6 @@ def test_rolling(self):
5959 r = g .rolling (window = 4 )
6060
6161 for f in ["sum" , "mean" , "min" , "max" , "count" , "kurt" , "skew" ]:
62-
6362 result = getattr (r , f )()
6463 expected = g .apply (lambda x : getattr (x .rolling (4 ), f )())
6564 tm .assert_frame_equal (result , expected )
@@ -69,9 +68,10 @@ def test_rolling(self):
6968 expected = g .apply (lambda x : getattr (x .rolling (4 ), f )(ddof = 1 ))
7069 tm .assert_frame_equal (result , expected )
7170
72- result = r .quantile (0.5 )
73- expected = g .apply (lambda x : x .rolling (4 ).quantile (0.5 ))
74- tm .assert_frame_equal (result , expected )
71+ for f in ["linear" , "lower" , "higher" , "midpoint" , "nearest" ]:
72+ result = r .quantile (0.4 , interpolation = f )
73+ expected = g .apply (lambda x : x .rolling (4 ).quantile (0.4 , interpolation = f ))
74+ tm .assert_frame_equal (result , expected )
7575
7676 def test_rolling_corr_cov (self ):
7777 g = self .frame .groupby ("A" )
@@ -141,9 +141,10 @@ def test_expanding(self):
141141 expected = g .apply (lambda x : getattr (x .expanding (), f )(ddof = 0 ))
142142 tm .assert_frame_equal (result , expected )
143143
144- result = r .quantile (0.5 )
145- expected = g .apply (lambda x : x .expanding ().quantile (0.5 ))
146- tm .assert_frame_equal (result , expected )
144+ for f in ["linear" , "lower" , "higher" , "midpoint" , "nearest" ]:
145+ result = r .quantile (0.4 , interpolation = f )
146+ expected = g .apply (lambda x : x .expanding ().quantile (0.4 , interpolation = f ))
147+ tm .assert_frame_equal (result , expected )
147148
148149 def test_expanding_corr_cov (self ):
149150 g = self .frame .groupby ("A" )
0 commit comments