Skip to content

Commit

Permalink
try getting 100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Apr 11, 2024
1 parent cabcbbd commit 59930b2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ def test_business_day_count_schema() -> None:
def test_business_day_count_w_holidays() -> None:
df = pl.DataFrame(
{
"start": [date(2020, 1, 1), date(2020, 1, 2)],
"end": [date(2020, 1, 2), date(2020, 1, 10)],
"start": [date(2020, 1, 1), date(2020, 1, 2), date(2020, 1, 2)],
"end": [date(2020, 1, 2), date(2020, 1, 10), date(2020, 1, 9)],
}
)
result = df.select(
business_day_count=pl.business_day_count(
"start", "end", holidays=[date(2020, 1, 1)]
"start", "end", holidays=[date(2020, 1, 1), date(2020, 1, 9)]
),
)["business_day_count"]
expected = pl.Series("business_day_count", [0, 6], pl.Int32)
expected = pl.Series("business_day_count", [0, 5, 5], pl.Int32)
assert_series_equal(result, expected)

0 comments on commit 59930b2

Please sign in to comment.