Skip to content

Commit 97dfaa9

Browse files
authored
CI: fix tests for pandas nightly (#421)
* CI: fix tests for pandas nightly * fix tests
1 parent 8333a14 commit 97dfaa9

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ python = ">=3.8,<3.11"
3434
types-pytz = ">= 2022.1.1"
3535

3636
[tool.poetry.dev-dependencies]
37-
mypy = "==0.990"
37+
mypy = "0.990"
3838
pyarrow = ">=9.0.0"
3939
pytest = ">=7.1.2"
4040
pyright = ">=1.1.278"
4141
poethepoet = "0.16.0"
4242
loguru = ">=0.6.0"
4343
pandas = "1.5.1"
4444
typing-extensions = ">=4.2.0"
45-
matplotlib = "~=3.5.0"
45+
matplotlib = ">=3.5.1"
4646
pre-commit = ">=2.19.0"
4747
black = ">=22.8.0"
4848
isort = ">=5.10.1"

tests/test_resampler.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
)
1717
from pandas.core.groupby.generic import SeriesGroupBy
1818
from pandas.core.resample import Resampler
19-
import pytest
2019
from typing_extensions import assert_type
2120

2221
from pandas._typing import Scalar
2322

24-
from tests import check
23+
from tests import (
24+
check,
25+
pytest_warns_bounded,
26+
)
2527

2628
DR = date_range("1999-1-1", periods=365, freq="D")
2729
DF_ = DataFrame(np.random.standard_normal((365, 1)), index=DR)
@@ -298,7 +300,9 @@ def s2scalar(val: Series) -> float:
298300

299301
check(S.resample("m").aggregate(np.sum), Series)
300302
check(S.resample("m").aggregate("sum"), Series)
301-
with pytest.warns(FutureWarning, match="Not prepending group keys"):
303+
with pytest_warns_bounded(
304+
FutureWarning, match="Not prepending group keys", upper="1.5.99"
305+
):
302306
check(S.resample("m").aggregate(s2series), Series)
303307
check(S.resample("m").aggregate(s2scalar), Series)
304308
check(S.resample("m").aggregate([np.mean]), DataFrame)
@@ -319,7 +323,9 @@ def df2scalar(val: DataFrame) -> float:
319323

320324
check(DF.resample("m").aggregate(np.sum), DataFrame)
321325
check(DF.resample("m").aggregate("sum"), DataFrame)
322-
with pytest.warns(FutureWarning, match="Not prepending group keys"):
326+
with pytest_warns_bounded(
327+
FutureWarning, match="Not prepending group keys", upper="1.5.99"
328+
):
323329
check(DF.resample("m").aggregate(df2frame), DataFrame)
324330
check(DF.resample("m").aggregate(df2series), DataFrame)
325331
check(DF.resample("m").aggregate(df2scalar), DataFrame)

0 commit comments

Comments
 (0)