コード例 #1
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_convert_1(self):
     self.assertEqual(roman_to_arabic('I'), 1)
コード例 #2
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_convert_40(self):
     self.assertEqual(roman_to_arabic('XL'), 40)
コード例 #3
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_convert_3724(self):
     self.assertEqual(roman_to_arabic('MMMDCCXXIV'), 3724)
コード例 #4
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_numbers_up_to_20(self):
     pairs = [('XVI', 16), ('XVII', 17), ('XVIII', 18), ('XIX', 19), ('XX', 20)]
     for roman, arabic in pairs:
         self.assertEqual(roman_to_arabic(roman), arabic)
コード例 #5
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_convert_25(self):
     self.assertEqual(roman_to_arabic('XXV'), 25)
コード例 #6
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_convert_14(self):
     self.assertEqual(roman_to_arabic('XIV'), 14)
コード例 #7
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_convert_15(self):
     self.assertEqual(roman_to_arabic('XV'), 15)
コード例 #8
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_convert_10(self):
     self.assertEqual(roman_to_arabic('X'), 10)
コード例 #9
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_numbers_up_to_13(self):
     pairs = [('XI', 11), ('XII', 12), ('XIII', 13)]
     for roman, arabic in pairs:
         self.assertEqual(roman_to_arabic(roman), arabic)
コード例 #10
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_convert_9(self):
     self.assertEqual(roman_to_arabic('IX'), 9)
コード例 #11
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_numbers_up_to_8(self):
     pairs = [('VI', 6), ('VII', 7), ('VIII', 8)]
     for roman, arabic in pairs:
         self.assertEqual(roman_to_arabic(roman), arabic)
コード例 #12
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_convert_5(self):
     self.assertEqual(roman_to_arabic('V'), 5)
コード例 #13
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_convert_4(self):
     self.assertEqual(roman_to_arabic('IV'), 4)
コード例 #14
0
ファイル: rtoa.test.py プロジェクト: noopurj/sheshares-tdd
 def test_convert_3(self):
     self.assertEqual(roman_to_arabic('III'), 3)