Add test for draw date function
This commit is contained in:
1 parent
42705d8f59
commit
728c3f9290
1 file changed
+6
@@ -1,6 +1,7 @@
|
|||||||
"""Tests for the `util` module."""
|
"""Tests for the `util` module."""
|
||||||
import pytest
|
import pytest
|
||||||
import util.convert as uc
|
import util.convert as uc
|
||||||
|
import util.drawing as ud
|
||||||
|
|
||||||
|
|
||||||
def test_convert_string_to_integer() -> None:
|
def test_convert_string_to_integer() -> None:
|
||||||
@@ -8,3 +9,8 @@ def test_convert_string_to_integer() -> None:
|
|||||||
assert uc.convert_string_to_integer("3.14") == 3
|
assert uc.convert_string_to_integer("3.14") == 3
|
||||||
with pytest.raises(uc.InvalidStringException) as exc:
|
with pytest.raises(uc.InvalidStringException) as exc:
|
||||||
uc.convert_string_to_integer("a")
|
uc.convert_string_to_integer("a")
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_next_draw_date() -> None:
|
||||||
|
assert ud.get_next_draw_date(game="megamillions", from_date='02/15/2026') == '02/17/2026'
|
||||||
|
assert ud.get_next_draw_date(game='powerball', from_date='02/15/2026') == '02/16/2026'
|
||||||
Reference in new issue
Block a user