2
2
from functools import partial
3
3
from io import StringIO
4
4
5
- from dateutil .tz import tzlocal
6
5
import numpy as np
7
6
import pytest
8
7
import pytz
@@ -477,15 +476,10 @@ def test_upsample_with_limit():
477
476
tm .assert_series_equal (result , expected )
478
477
479
478
480
- @pytest .mark .parametrize ("freq" , ["Y" , "10M" , " 5D" , "10H" , "5Min" , "10S" ])
479
+ @pytest .mark .parametrize ("freq" , ["5D" , "10H" , "5Min" , "10S" ])
481
480
@pytest .mark .parametrize ("rule" , ["Y" , "3M" , "15D" , "30H" , "15Min" , "30S" ])
482
481
def test_nearest_upsample_with_limit (tz_aware_fixture , freq , rule ):
483
482
# GH 33939
484
- tz = tz_aware_fixture
485
- if str (tz ) == "tzlocal()" and rule == "30S" and freq in ["Y" , "10M" ]:
486
- # GH#34413 separate these so we can mark as slow, see
487
- # test_nearest_upsample_with_limit_tzlocal
488
- return
489
483
rng = date_range ("1/1/2000" , periods = 3 , freq = freq , tz = tz_aware_fixture )
490
484
ts = Series (np .random .randn (len (rng )), rng )
491
485
@@ -494,20 +488,6 @@ def test_nearest_upsample_with_limit(tz_aware_fixture, freq, rule):
494
488
tm .assert_series_equal (result , expected )
495
489
496
490
497
- @pytest .mark .slow
498
- @pytest .mark .parametrize ("freq" , ["Y" , "10M" ])
499
- def test_nearest_upsample_with_limit_tzlocal (freq ):
500
- # GH#33939, GH#34413 split off from test_nearest_upsample_with_limit
501
- rule = "30S"
502
- tz = tzlocal ()
503
- rng = date_range ("1/1/2000" , periods = 3 , freq = freq , tz = tz )
504
- ts = Series (np .random .randn (len (rng )), rng )
505
-
506
- result = ts .resample (rule ).nearest (limit = 2 )
507
- expected = ts .reindex (result .index , method = "nearest" , limit = 2 )
508
- tm .assert_series_equal (result , expected )
509
-
510
-
511
491
def test_resample_ohlc (series ):
512
492
s = series
513
493
0 commit comments