Add tests folder and first util test
This commit is contained in:
1 parent
e8c94e7f7b
commit
97837a0f97
1 file changed
+10
@@ -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")
|
||||
Reference in new issue
Block a user