def test_from_roman_known_values(self): '''from_roman should give known result with known input ''' for integer, numeral in self.known_values: result = roman.from_roman(numeral) self.assertEqual(integer, result)
def test_roundtrip(self): for integer in range(1, 4000): # equivalent to xrange since python3 numeral = roman.to_roman(integer) result = roman.from_roman(numeral) self.assertEqual(integer, result)