Пример #1
0
 def test_convert_1001(self):
     '''
         tests that algorithm can jump significant digits
         in while loop.
     '''
     roman = int_to_roman(1001)
     self.assertEqual(roman, "MI")
Пример #2
0
 def test_convert_3999(self):
     roman = int_to_roman(3999)
     self.assertEqual(roman, "MMMCMXCIX")
Пример #3
0
 def test_convert_1000(self):
     roman = int_to_roman(1000)
     self.assertEqual(roman, "M")
Пример #4
0
 def test_convert_500(self):
     roman = int_to_roman(500)
     self.assertEqual(roman, "D")
Пример #5
0
 def test_convert_900(self):
     roman = int_to_roman(900)
     self.assertEqual(roman, "CM")
Пример #6
0
 def test_convert_400(self):
     roman = int_to_roman(400)
     self.assertEqual(roman, "CD")
Пример #7
0
 def test_convert_9(self):
     roman = int_to_roman(9)
     self.assertEqual(roman, "IX")
Пример #8
0
 def test_convert_5(self):
     roman = int_to_roman(5)
     self.assertEqual(roman, "V")
Пример #9
0
 def test_convert_4(self):
     roman = int_to_roman(4)
     self.assertEqual(roman, "IV")
Пример #10
0
 def test_convert_1(self):
     roman = int_to_roman(1)
     self.assertEqual(roman, "I")