Skip to content

Commit

Permalink
test(polars): unxfail polars timestamp truncation tests by casting th…
Browse files Browse the repository at this point in the history
…e expected result dtype (ibis-project#10040)
  • Loading branch information
cpcloud authored and ncclementi committed Sep 24, 2024
1 parent f15b1e6 commit 6b7ceb8
Showing 1 changed file with 6 additions and 46 deletions.
52 changes: 6 additions & 46 deletions ibis/backends/tests/test_temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,62 +275,22 @@ def test_timestamp_extract_week_of_year(backend, alltypes, df):
@pytest.mark.parametrize(
("ibis_unit", "pandas_unit"),
[
param(
"Y",
"Y",
marks=[
pytest.mark.notimpl(
["polars"],
raises=AssertionError,
reason="numpy array are different",
),
],
),
param(
"Q",
"Q",
marks=[
pytest.mark.notimpl(
["polars"],
raises=AssertionError,
reason="numpy array are different",
),
],
),
param(
"M",
"M",
marks=[
pytest.mark.notimpl(
["polars"],
raises=AssertionError,
reason="numpy array are different",
),
],
),
param(
"D",
"D",
marks=[
pytest.mark.notimpl(
["polars"],
raises=AssertionError,
reason="numpy array are different",
),
],
),
param("Y", "Y", id="year"),
param("Q", "Q", id="quarter"),
param("M", "M", id="month"),
param(
"W",
"W",
marks=[
pytest.mark.notimpl(["mysql"], raises=com.UnsupportedOperationError),
pytest.mark.notimpl(
["polars", "flink"],
["flink"],
raises=AssertionError,
reason="implemented, but doesn't match other backends",
),
],
),
param("D", "D"),
param(
"h",
"h",
Expand Down Expand Up @@ -427,7 +387,7 @@ def test_timestamp_truncate(backend, alltypes, df, ibis_unit, pandas_unit):
expected = dtns.floor(pandas_unit)

result = expr.execute()
expected = backend.default_series_rename(expected)
expected = backend.default_series_rename(expected).astype(result.dtype)

backend.assert_series_equal(result, expected)

Expand Down

0 comments on commit 6b7ceb8

Please sign in to comment.