There was an error while loading. Please reload this page.
1 parent 57c266c commit 29fc9c1Copy full SHA for 29fc9c1
1 file changed
test/time_feature/test_seasonality.py
@@ -73,12 +73,13 @@ def test_get_seasonality_for_frequency():
73
74
def test_get_seasonality_deprecation_warning():
75
"""The old get_seasonality should emit a DeprecationWarning."""
76
- with warnings.catch_warnings(record=True) as w:
+ with warnings.catch_warnings(record=True) as caught:
77
warnings.simplefilter("always")
78
get_seasonality("H")
79
deprecation_warnings = [
80
- ww for ww in w
81
- if issubclass(ww.category, DeprecationWarning)
82
- and "get_seasonality_for_frequency" in str(ww.message)
+ warning
+ for warning in caught
+ if issubclass(warning.category, DeprecationWarning)
83
+ and "get_seasonality_for_frequency" in str(warning.message)
84
]
85
assert len(deprecation_warnings) == 1
0 commit comments