Skip to content

Commit

Permalink
Add unit test (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaslink authored Jan 21, 2025
2 parents 1282218 + 8bb78ec commit f1f1cf5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,27 @@ class TestCases:
"eval_last": True,
"id": "period_1_day"
},
{
"messages": [
create_message(time=datetime(2024, 2, 1, 4)),
create_message(time=datetime(2024, 2, 1, 10)),
create_message(time=datetime(2024, 2, 1, 15)), # gap 1
create_message(time=datetime(2024, 2, 2, 5)),
create_message(time=datetime(2024, 2, 2, 11)), # gap 2
create_message(time=datetime(2024, 2, 2, 20)),
create_message(time=datetime(2024, 2, 3, 2)),
create_message(time=datetime(2024, 2, 3, 8)),
create_message(time=datetime(2024, 2, 3, 14)), # gap 3

],
"open_gaps": [],
"threshold": 6,
"date_range": ("2024-02-01", "2024-02-04"),
"window_period_d": 1,
"expected_gaps": 3,
"eval_last": True,
"id": "period_1_day_for_3_days"
},
{
"messages": [
create_message(time=datetime(2024, 1, 1, 0)), # This shouldn´t be detected.
Expand Down

0 comments on commit f1f1cf5

Please sign in to comment.