def test_from_roman_known_values(self): '''from_roman should give known result with known input''' for integer, numeral in self.known_values: result = from_roman(numeral) self.assertEqual(integer, result)
def test_roundtrip(self): """from_roman(to_roman(n))==n for all n""" for integer in range(1, 5000): numeral = to_roman(integer) result = from_roman(numeral) self.assertEqual(integer, result)