Skip to content

Commit

Permalink
test(ir): ensure that no backends are required to run the core tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kszucs committed Feb 5, 2024
1 parent c5f229f commit bded65c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ibis/backends/tests/test_temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@
from ibis.common.annotations import ValidationError


def day_name(obj: pd.core.indexes.accessors.DatetimeProperties | pd.Timestamp) -> str:
"""Backwards compatible name-of-day getting function.
Returns
-------
str
The name of the day corresponding to `obj`
"""
try:
return obj.day_name()
except AttributeError:
return obj.weekday_name


def day_name(obj: pd.core.indexes.accessors.DatetimeProperties | pd.Timestamp) -> str:
"""Backwards compatible name-of-day getting function.
Expand Down

0 comments on commit bded65c

Please sign in to comment.