Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove failing datetime subclass test #19068

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions py-polars/tests/unit/functions/test_lit.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import enum
from datetime import date, datetime, timedelta
from datetime import datetime, timedelta
from decimal import Decimal
from typing import TYPE_CHECKING, Any

Expand Down Expand Up @@ -195,21 +195,3 @@ def test_lit_decimal_parametric(s: pl.Series) -> None:

assert df.dtypes[0] == pl.Decimal(None, scale)
assert result == value


def test_lit_date_subclass() -> None:
class SubDate(date):
pass

result = pl.select(a=pl.lit(SubDate(2024, 1, 1)))
expected = pl.DataFrame({"a": [date(2024, 1, 1)]})
assert_frame_equal(result, expected)


def test_lit_datetime_subclass() -> None:
class SubDatetime(datetime):
pass

result = pl.select(a=pl.lit(SubDatetime(2024, 1, 1)))
expected = pl.DataFrame({"a": [datetime(2024, 1, 1)]})
assert_frame_equal(result, expected)
Loading