@@ -205,23 +205,6 @@ def test_constructor_U(self):
205
205
with pytest .raises (ValueError , match = "Invalid frequency: X" ):
206
206
period_range ("2007-1-1" , periods = 500 , freq = "X" )
207
207
208
- @pytest .mark .parametrize (
209
- "freq,freq_depr" ,
210
- [
211
- ("2Y" , "2A" ),
212
- ("2Y" , "2a" ),
213
- ("2Y-AUG" , "2A-AUG" ),
214
- ("2Y-AUG" , "2A-aug" ),
215
- ],
216
- )
217
- def test_a_deprecated_from_time_series (self , freq , freq_depr ):
218
- # GH#52536
219
- msg = f"'{ freq_depr [1 :]} ' is deprecated and will be removed in a "
220
- f"future version. Please use '{ freq [1 :]} ' instead."
221
-
222
- with tm .assert_produces_warning (FutureWarning , match = msg ):
223
- period_range (freq = freq_depr , start = "1/1/2001" , end = "12/1/2009" )
224
-
225
208
@pytest .mark .parametrize ("freq_depr" , ["2H" , "2MIN" , "2S" , "2US" , "2NS" ])
226
209
def test_uppercase_freq_deprecated_from_time_series (self , freq_depr ):
227
210
# GH#52536, GH#54939
@@ -239,3 +222,10 @@ def test_lowercase_freq_deprecated_from_time_series(self, freq_depr):
239
222
240
223
with tm .assert_produces_warning (FutureWarning , match = msg ):
241
224
period_range (freq = freq_depr , start = "1/1/2001" , end = "12/1/2009" )
225
+
226
+ @pytest .mark .parametrize ("freq" , ["2A" , "2a" , "2A-AUG" , "2A-aug" ])
227
+ def test_A_raises_from_time_series (self , freq ):
228
+ msg = f"Invalid frequency: { freq } "
229
+
230
+ with pytest .raises (ValueError , match = msg ):
231
+ period_range (freq = freq , start = "1/1/2001" , end = "12/1/2009" )
0 commit comments