From 97837a0f977f482a5b005d1f18715e8ad9c391bb Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sat, 14 Feb 2026 20:38:22 -0500 Subject: [PATCH] Add tests folder and first util test --- tests/test_util.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/test_util.py 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