Add test for draw date function
This commit is contained in:
1 parent
42705d8f59
commit
728c3f9290
1 file changed
+7
-1
+7
-1
@@ -1,10 +1,16 @@
|
||||
"""Tests for the `util` module."""
|
||||
import pytest
|
||||
import util.convert as uc
|
||||
import util.drawing as ud
|
||||
|
||||
|
||||
def test_convert_string_to_integer() -> None:
|
||||
assert uc.convert_string_to_integer("0") == 0
|
||||
assert uc.convert_string_to_integer("3.14") == 3
|
||||
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