Skip to content

Commit eea95a3

Browse files
authored
TST: Skip flaky offset test case on WASM (pandas-dev#60186)
* TST: Skip flaky offset test case on WASM * Check tzinfo exists * Check for zoneinfo directly * Undo original change * Try installing tzdata to fix * Revert "Try installing tzdata to fix" This reverts commit 6698cd5. * Revert "Undo original change" This reverts commit 5bc7272.
1 parent 6631202 commit eea95a3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pandas/tests/tseries/offsets/test_offsets_properties.py

+13
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@
88
tests, or when trying to pin down the bugs exposed by the tests below.
99
"""
1010

11+
import zoneinfo
12+
1113
from hypothesis import (
1214
assume,
1315
given,
1416
)
1517
import pytest
1618

19+
from pandas.compat import WASM
20+
1721
import pandas as pd
1822
from pandas._testing._hypothesis import (
1923
DATETIME_JAN_1_1900_OPTIONAL_TZ,
@@ -28,6 +32,15 @@
2832
@given(DATETIME_JAN_1_1900_OPTIONAL_TZ, YQM_OFFSET)
2933
def test_on_offset_implementations(dt, offset):
3034
assume(not offset.normalize)
35+
# This case is flaky in CI 2024-11-04
36+
assume(
37+
not (
38+
WASM
39+
and isinstance(dt.tzinfo, zoneinfo.ZoneInfo)
40+
and dt.tzinfo.key == "Indian/Cocos"
41+
and isinstance(offset, pd.offsets.MonthBegin)
42+
)
43+
)
3144
# check that the class-specific implementations of is_on_offset match
3245
# the general case definition:
3346
# (dt + offset) - offset == dt

0 commit comments

Comments
 (0)