Beispiel #1
0
 def test_returns_Is_for_less_equals_3(self):
     self.assertEqual('I', to_roman(1))
     self.assertEqual("II", to_roman(2))
     self.assertEqual("III", to_roman(3))
Beispiel #2
0
 def test_returns_error_for_less_than_1(self):
     self.assertEqual('Less than 1!', to_roman(0))
Beispiel #3
0
 def test_returns_error_for_more_than_3999(self):
     self.assertEqual('More than 3999!', to_roman(4000))
Beispiel #4
0
 def test_returns_MMMCMXCIX_for_3999(self):
     self.assertEqual('MMMCMXCIX', to_roman(3999))
Beispiel #5
0
 def test_returns_error_for_non_ints(self):
     self.assertEqual('Error', to_roman('halp'))
Beispiel #6
0
 def test_returns_XI_for_11(self):
     self.assertEqual('XI', to_roman(11))
Beispiel #7
0
 def test_returns_XL_for_40(self):
     self.assertEqual('XL', to_roman(40))
Beispiel #8
0
 def test_returns_X_for_10(self):
     self.assertEqual('X', to_roman(10))
Beispiel #9
0
 def test_returns_IX_for_9(self):
     self.assertEqual('IX', to_roman(9))
Beispiel #10
0
 def test_returns_VI_for_6(self):
     self.assertEqual("VI", to_roman(6))
     self.assertEqual("VII", to_roman(7))
     self.assertEqual("VIII", to_roman(8))
Beispiel #11
0
 def test_returns_V_for_5(self):
     self.assertEqual('V', to_roman(5))
Beispiel #12
0
 def test_returns_IV_for_4(self):
     self.assertEqual("IV", to_roman(4))