Skip to content

Commit

Permalink
drive-by: address false-positive in a parametric test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie committed Aug 14, 2024
1 parent 3b1b548 commit 0352b8b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions py-polars/tests/unit/datatypes/test_temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2294,12 +2294,13 @@ def test_weekday_vs_stdlib_datetime(
) -> None:
result = (
pl.Series([value], dtype=pl.Datetime(time_unit))
.dt.replace_time_zone(time_zone)
.dt.replace_time_zone(time_zone, non_existent="null")
.dt.weekday()
.item()
)
expected = value.isoweekday()
assert result == expected
if result is not None:
expected = value.isoweekday()
assert result == expected


@given(
Expand Down

0 comments on commit 0352b8b

Please sign in to comment.