Ejemplo n.º 1
0
 def test_to_roman_known_values(self):
     '''to_roman should give known result with known input'''
     for integer, numeral in self.known_values:
         result = roman8.to_roman(integer)
         self.assertEqual(numeral, result)
Ejemplo n.º 2
0
 def test_roundtrip(self):
     '''from_roman(to_roman(n))==n for all n'''
     for integer in range(1, 4000):
         numeral = roman8.to_roman(integer)
         result = roman8.from_roman(numeral)
         self.assertEqual(integer, result)