From 52944a53ab6cae19d6a94fdf0710088433ba71e7 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Thu, 5 Mar 2026 11:03:48 -0500 Subject: [PATCH] Add test_get_recent_draw_date test --- tests/test_lottery_predictor_collect.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_lottery_predictor_collect.py b/tests/test_lottery_predictor_collect.py index 010ba95..2c73b64 100644 --- a/tests/test_lottery_predictor_collect.py +++ b/tests/test_lottery_predictor_collect.py @@ -1,3 +1,5 @@ +import datetime + import pytest import lottery_predictor.collect as collect @@ -7,3 +9,10 @@ def test_get_record_count() -> None: assert isinstance(collect.get_record_count('MegaMillionsDraw'), int) with pytest.raises(ValueError): collect.get_record_count('SomeNonExistentTable') + + +def test_get_recent_draw_date() -> None: + assert isinstance(collect.get_recent_draw_date(table_name='PowerballDraw'), datetime.date) + assert isinstance(collect.get_recent_draw_date(table_name='MegaMillionsDraw'), datetime.date) + with pytest.raises(ValueError): + collect.get_recent_draw_date(table_name='SomeNonExistentTable')