10 lines
325 B
Python
10 lines
325 B
Python
"""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") |