コード例 #1
0
ファイル: test_roman.py プロジェクト: nguyentu1602/pyexp
 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)
コード例 #2
0
 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)
コード例 #3
0
ファイル: test_roman.py プロジェクト: nguyentu1602/pyexp
 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)
コード例 #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 = roman.from_roman(numeral)
         self.assertEqual(integer, result)