We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b1e020 commit 4eea34aCopy full SHA for 4eea34a
pandas/tests/test_window.py
@@ -1084,14 +1084,15 @@ def alt(x):
1084
1085
self._check_moment_func(f, alt, name='quantile', quantile=q)
1086
1087
- self.assertRaises(ValueError, mom.rolling_quantile,
1088
- np.array([1, 2, 3]), window=3, quantile=-0.1)
+ def test_rolling_quantile_param(self):
+ ser = Series([0.0, .1, .5, .9, 1.0])
1089
1090
1091
- np.array([1, 2, 3]), window=3, quantile=10)
+ with self.assertRaises(ValueError):
+ ser.rolling(3).quantile(-0.1)
1092
+ ser.rolling(3).quantile(10.0)
1093
- self.assertRaises(TypeError, mom.rolling_quantile,
1094
- np.array([1, 2, 3]), window=3, quantile='foo')
+ with self.assertRaises(TypeError):
1095
+ ser.rolling(3).quantile('foo')
1096
1097
def test_rolling_apply(self):
1098
# suppress warnings about empty slices, as we are deliberately testing
0 commit comments