Skip to content

Commit

Permalink
Backport PR pandas-dev#60186: TST: Skip flaky offset test case on WASM
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Nov 6, 2024
1 parent b9f1bc6 commit 32f21ea
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pandas/tests/tseries/offsets/test_offsets_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
You may wish to consult the previous version for inspiration on further
tests, or when trying to pin down the bugs exposed by the tests below.
"""

import zoneinfo

from hypothesis import (
assume,
given,
)
import pytest
import pytz

from pandas.compat import WASM

import pandas as pd
from pandas._testing._hypothesis import (
DATETIME_JAN_1_1900_OPTIONAL_TZ,
Expand All @@ -28,6 +33,15 @@
@given(DATETIME_JAN_1_1900_OPTIONAL_TZ, YQM_OFFSET)
def test_on_offset_implementations(dt, offset):
assume(not offset.normalize)
# This case is flaky in CI 2024-11-04
assume(
not (
WASM
and isinstance(dt.tzinfo, zoneinfo.ZoneInfo)
and dt.tzinfo.key == "Indian/Cocos"
and isinstance(offset, pd.offsets.MonthBegin)
)
)
# check that the class-specific implementations of is_on_offset match
# the general case definition:
# (dt + offset) - offset == dt
Expand Down

0 comments on commit 32f21ea

Please sign in to comment.