1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21import roman from lc_0013 import Solution def test_examples(): s = Solution() assert s.romanToInt("III") == 3 assert s.romanToInt("IV") == 4 assert s.romanToInt("IX") == 9 assert s.romanToInt("LVIII") == 58 assert s.romanToInt("MCMXCIV") == 1994 def test_against_known_implementation(): s = Solution() for x in range(1, 4000): assert s.romanToInt(roman.toRoman(x)) == x