Skip to content

Commit 200abb2

Browse files
authored
TST: remove super slow cases on upsample_nearest_limit (#34780)
1 parent 5f20674 commit 200abb2

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
rev: 19.10b0
44
hooks:
55
- id: black
6-
language_version: python3.7
6+
language_version: python3
77
- repo: https://gitlab.com/pycqa/flake8
88
rev: 3.7.7
99
hooks:

pandas/tests/io/parser/test_multi_thread.py

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from multiprocessing.pool import ThreadPool
77

88
import numpy as np
9+
import pytest
910

1011
import pandas as pd
1112
from pandas import DataFrame
@@ -34,6 +35,7 @@ def _construct_dataframe(num_rows):
3435
return df
3536

3637

38+
@pytest.mark.slow
3739
def test_multi_thread_string_io_read_csv(all_parsers):
3840
# see gh-11786
3941
parser = all_parsers
@@ -126,6 +128,7 @@ def reader(arg):
126128
return final_dataframe
127129

128130

131+
@pytest.mark.slow
129132
def test_multi_thread_path_multipart_read_csv(all_parsers):
130133
# see gh-11786
131134
num_tasks = 4

pandas/tests/resample/test_datetime_index.py

+1-21
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from functools import partial
33
from io import StringIO
44

5-
from dateutil.tz import tzlocal
65
import numpy as np
76
import pytest
87
import pytz
@@ -477,15 +476,10 @@ def test_upsample_with_limit():
477476
tm.assert_series_equal(result, expected)
478477

479478

480-
@pytest.mark.parametrize("freq", ["Y", "10M", "5D", "10H", "5Min", "10S"])
479+
@pytest.mark.parametrize("freq", ["5D", "10H", "5Min", "10S"])
481480
@pytest.mark.parametrize("rule", ["Y", "3M", "15D", "30H", "15Min", "30S"])
482481
def test_nearest_upsample_with_limit(tz_aware_fixture, freq, rule):
483482
# 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
489483
rng = date_range("1/1/2000", periods=3, freq=freq, tz=tz_aware_fixture)
490484
ts = Series(np.random.randn(len(rng)), rng)
491485

@@ -494,20 +488,6 @@ def test_nearest_upsample_with_limit(tz_aware_fixture, freq, rule):
494488
tm.assert_series_equal(result, expected)
495489

496490

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-
511491
def test_resample_ohlc(series):
512492
s = series
513493

0 commit comments

Comments
 (0)