Skip to content

Commit a746629

Browse files
committed
Adjust the tests for pandas=2.2.0
pandas-dev/pandas#57229 pandas-dev/pandas#55080
1 parent 2731f2e commit a746629

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

docs/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ ITables ChangeLog
66

77
**Fixed**
88
- Complex table footers are now in the correct order ([#219](https://github.com/mwouts/itables/issues/219))
9+
- We have adjusted the test suite for `pandas==2.2.0`
10+
([#223](https://github.com/mwouts/itables/issues/223),
11+
[pandas-57229](https://github.com/pandas-dev/pandas/issues/57229),
12+
[pandas-55080](https://github.com/pandas-dev/pandas/issues/55080))
913

1014

1115
1.6.3 (2023-12-10)

itables/sample_dfs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ def get_dict_of_test_series(polars=False):
312312

313313
@lru_cache()
314314
def generate_date_series():
315+
if pd.__version__ >= "2.2.0":
316+
# https://github.com/pandas-dev/pandas/issues/55080 is back in 2.2.0?
317+
return pd.Series(pd.date_range("1970-01-01", "2099-12-31", freq="D"))
315318
return pd.Series(pd.date_range("1677-09-23", "2262-04-10", freq="D"))
316319

317320

tests/test_sample_dfs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
pytest.mark.filterwarnings("error"),
2626
# Seen on the CI on Py38 and Py39
2727
pytest.mark.filterwarnings("ignore::ResourceWarning"),
28+
# TODO: https://github.com/mwouts/itables/issues/223
29+
pytest.mark.filterwarnings(
30+
"ignore:Setting an item of incompatible dtype is deprecated:FutureWarning"
31+
),
2832
]
2933

3034
if PANDAS_VERSION_MAJOR < 2:

0 commit comments

Comments
 (0)