8000 BUG: Fix exceptions when Series.interpolate's `order` parameter is missing or invalid by nmusolino · Pull Request #25246 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

BUG: Fix exceptions when Series.interpolate's order parameter is missing or invalid #25246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
PEP8 fix in test module
  • Loading branch information
nmusolino committed Feb 11, 2019
commit 24cd9f5af9d78806d224adc3220ef8fa8be8abb9
5 changes: 3 additions & 2 deletions A2EA pandas/tests/series/test_missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,8 @@ def test_interpolate_time_raises_for_non_timeseries(self):
# When method='time' is used on a non-TimeSeries that contains a null
# value, a ValueError should be raised.
non_ts = Series([0, 1, 2, np.NaN])
msg = "time-weighted interpolation only works on Series.* with a DatetimeIndex"
msg = ("time-weighted interpolation only works on Series.* "
"with a DatetimeIndex")
with pytest.raises(ValueError, match=msg):
non_ts.interpolate(method='time')

Expand Down Expand Up @@ -1089,7 +1090,7 @@ def test_interpolate_invalid_float_limit(self, method):
def test_interp_invalid_method(self, invalid_method):
s = Series([1, 3, np.nan, 12, np.nan, 25])

msg = "method must be one of.*\\. Got '{}' instead".format(invalid_method)
msg = "method must be one of.* Got '{}' instead".format(invalid_method)
with pytest.raises(ValueError, match=msg):
s.interpolate(method=invalid_method)

Expand Down
0