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 Dec 26, 2023
1 parent bae62d8 commit 6423196
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 @@ -91,6 +91,20 @@ def day_name(obj: pd.core.indexes.accessors.DatetimeProperties | pd.Timestamp) -
return obj.weekday_name


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


@pytest.mark.parametrize("attr", ["year", "month", "day"])
@pytest.mark.parametrize(
"expr_fn",
Expand Down

0 comments on commit 6423196

Please sign in to comment.