Exemple #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")
Exemple #2
0
 def test_convert_3999(self):
     roman = int_to_roman(3999)
     self.assertEqual(roman, "MMMCMXCIX")
Exemple #3
0
 def test_convert_1000(self):
     roman = int_to_roman(1000)
     self.assertEqual(roman, "M")
Exemple #4
0
 def test_convert_500(self):
     roman = int_to_roman(500)
     self.assertEqual(roman, "D")
Exemple #5
0
 def test_convert_900(self):
     roman = int_to_roman(900)
     self.assertEqual(roman, "CM")
Exemple #6
0
 def test_convert_400(self):
     roman = int_to_roman(400)
     self.assertEqual(roman, "CD")
Exemple #7
0
 def test_convert_9(self):
     roman = int_to_roman(9)
     self.assertEqual(roman, "IX")
Exemple #8
0
 def test_convert_5(self):
     roman = int_to_roman(5)
     self.assertEqual(roman, "V")
Exemple #9
0
 def test_convert_4(self):
     roman = int_to_roman(4)
     self.assertEqual(roman, "IV")
Exemple #10
0
 def test_convert_1(self):
     roman = int_to_roman(1)
     self.assertEqual(roman, "I")