예제 #1
0
 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 = roman6.from_roman(numeral)
         self.assertEqual(integer, result)
예제 #2
0
 def test_roundtrip(self):
     '''from_roman(to_roman(n))==n per tutti gli n'''
     for integer in range(1, 4000):
         numeral = roman6.to_roman(integer)
         result = roman6.from_roman(numeral)
         self.assertEqual(integer, result)
예제 #3
0
 def test_from_roman_known_values(self):
     '''from_roman should give known result with known input'''
     for integer, numeral in self.known_values:
         result = roman6.from_roman(numeral)
         self.assertEqual(integer, result)
예제 #4
0
 def test_from_roman_known_values(self):
     '''from_roman should give known result with known input'''
     for integer, numeral in self.known_values:
         result = roman6.from_roman(numeral)
         self.assertEqual(integer, result)
예제 #5
0
 def test_roundtrip(self):
     '''from_roman(to_roman(n))==n for all n'''
     for integer in range(1, 4000):
         numeral = roman6.to_roman(integer)
         result = roman6.from_roman(numeral)
         self.assertEqual(integer, result)
예제 #6
0
 def test_from_roman_known_values(self):
     '''from_roman powinna dac znany rezultat dla danego napisu wejsciowego'''
     for integer, numeral in self.known_values:
         result = roman6.from_roman(numeral)
         self.assertEqual(integer, result)
예제 #7
0
 def test_roundtrip(self):
     """from_roman(to_roman(n))==n for all n"""
     for integer in range(1, 4000):
         numeral = roman6.to_roman(integer)
         result = roman6.from_roman(numeral)
         self.assertEqual(integer, result)