def test_from_roman_known_values(self): '''from_roman should give known result with known input''' for integer, numeral in self.known_values: result = roman7.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, 4000): numeral = roman7.to_roman(integer) result = roman7.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, 4000) : numeral = roman7.to_roman(integer) result = roman7.from_roman(numeral) self.assertEqual(integer, result)
def test_from_roman_known_values(self) : '''from_roman should give known result from known input''' for integer, numeral in self.known_values : result = roman7.from_roman(numeral) self.assertEqual(integer, result)
def test_from_roman_known_values(self): '''from_roman dovrebbe dare un risultato noto con un ingresso noto''' for integer, numeral in self.known_values: result = roman7.from_roman(numeral) self.assertEqual(integer, result)
def test_roman_conversion(): assert to_roman(3) == 'III' assert from_roman('IV') == 4