コード例 #1
0
 def test_convert_VII_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("VII"), 7)
コード例 #2
0
 def test_convert_54_to_roman_string(self):
     self.assertEqual(RomanNumerals.int_to_roman_string(54), "LIV")
コード例 #3
0
 def test_convert_76_to_roman_string(self):
     self.assertEqual(RomanNumerals.int_to_roman_string(76), "LXXVI")
コード例 #4
0
 def test_convert_10_to_roman_string(self):
     self.assertEqual(RomanNumerals.int_to_roman_string(10), "X")
コード例 #5
0
 def test_convert_32_to_roman_string(self):
     self.assertEqual(RomanNumerals.int_to_roman_string(32), "XXXII")
コード例 #6
0
 def test_parse_3999_from_constructor_is_valid(self):
     rn = RomanNumerals(integer=3999)
     self.assertTrue(rn.is_valid)
コード例 #7
0
 def test_import_ok(self):
     RomanNumerals()
コード例 #8
0
 def test_convert_DCLIV_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("DCLIV"), 654)
コード例 #9
0
 def test_convert_DCCLXV_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("DCCLXV"), 765)
コード例 #10
0
 def test_convert_CDXXXII_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("CDXXXII"), 432)
コード例 #11
0
 def test_convert_DXLIII_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("DXLIII"), 543)
コード例 #12
0
 def test_convert_CCCXXI_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("CCCXXI"), 321)
コード例 #13
0
 def test_convert_CC_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("CC"), 200)
コード例 #14
0
 def test_convert_XCIX_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("XCIX"), 99)
コード例 #15
0
 def test_convert_MMMCMXCIX_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("MMMCMXCIX"), 3999)
コード例 #16
0
 def test_convert_DCCCLXXVI_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("DCCCLXXVI"), 876)
コード例 #17
0
 def test_parse_3999_is_valid(self):
     rn = RomanNumerals()
     rn.parse_from_int(3999)
     self.assertTrue(rn.is_valid)
コード例 #18
0
 def test_convert_CMLXXXVII_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("CMLXXXVII"), 987)
コード例 #19
0
 def test_convert_8_to_roman_string(self):
     self.assertEqual(RomanNumerals.int_to_roman_string(8), "VIII")
コード例 #20
0
 def test_convert_MCCXXXIV_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("MCCXXXIV"), 1234)
コード例 #21
0
 def test_convert_9_to_roman_string(self):
     self.assertEqual(RomanNumerals.int_to_roman_string(9), "IX")
コード例 #22
0
 def test_convert_MDCLXVI_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("MDCLXVI"), 1666)
コード例 #23
0
 def test_convert_21_to_roman_string(self):
     self.assertEqual(RomanNumerals.int_to_roman_string(21), "XXI")
コード例 #24
0
 def test_convert_MMCCCXLV_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("MMCCCXLV"), 2345)
コード例 #25
0
 def test_convert_43_to_roman_string(self):
     self.assertEqual(RomanNumerals.int_to_roman_string(43), "XLIII")
コード例 #26
0
 def test_convert_MMM_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("MMM"), 3000)
コード例 #27
0
 def test_convert_65_to_roman_string(self):
     self.assertEqual(RomanNumerals.int_to_roman_string(65), "LXV")
コード例 #28
0
 def test_convert_MMMCDLVI_to_int(self):
     self.assertEqual(RomanNumerals.roman_string_to_int("MMMCDLVI"), 3456)
コード例 #29
0
 def test_convert_87_to_roman_string(self):
     self.assertEqual(RomanNumerals.int_to_roman_string(87), "LXXXVII")
コード例 #30
0
 def test_convert_3999_to_roman_string(self):
     self.assertEqual(RomanNumerals.int_to_roman_string(3999), "MMMCMXCIX")