diff --git a/tests/test_util.py b/tests/test_util.py new file mode 100644 index 0000000..60af8ba --- /dev/null +++ b/tests/test_util.py @@ -0,0 +1,10 @@ +"""Tests for the `util` module.""" +import pytest +import util.convert as uc + + +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") \ No newline at end of file