You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
507 B
31 lines
507 B
import pytest
|
|
|
|
import stuff
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
("n", "expected"),
|
|
[
|
|
(0, 0),
|
|
(1, 1),
|
|
(5, 2),
|
|
(4, 2),
|
|
(8, 2),
|
|
(9, 3),
|
|
],
|
|
)
|
|
def test_find_sqrt_ish(n: int, expected: int):
|
|
assert stuff.find_sqrt_ish(n) == expected
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
("n", "expected"),
|
|
[
|
|
(3, "III"),
|
|
(58, "LVIII"),
|
|
(1994, "MCMXCIV"),
|
|
],
|
|
)
|
|
def test_int_to_roman(n: int, expected: str):
|
|
assert stuff.Roman.i2r(n) == expected
|