コード例 #1
0
ファイル: main.py プロジェクト: VilmaU/Roman_converter
def main():
    print("Hello, lets test your numbers")
    skaiciukas = read_arabic()
    atsakymas = to_roman(skaiciukas)
    print("Your Roman number: ", atsakymas)

    raides = read_roman()
    atsakymas = to_arabic(raides)
    print("Your Arabic number: ", atsakymas)
コード例 #2
0
ファイル: test.py プロジェクト: Prakti/roman-numerals-dojo
 def test_1_is_NotARomanNumber(self):
     with self.assertRaises(NotARomanNumber):
         roman.to_arabic(1)
コード例 #3
0
ファイル: test.py プロジェクト: Prakti/roman-numerals-dojo
 def test_MMMMMMMCMXLIX_to_7949(self):
     self.assertEqual(roman.to_arabic("MMMMMMMCMXLIX"), 7949)
コード例 #4
0
ファイル: test.py プロジェクト: Prakti/roman-numerals-dojo
 def test_MCMLXXXXVII_to_1987(self):
     self.assertEqual(roman.to_arabic("MCMLXXXVII"), 1987)
コード例 #5
0
ファイル: test.py プロジェクト: Prakti/roman-numerals-dojo
 def test_XV_to_15(self):
     self.assertEqual(roman.to_arabic("XV"), 15)
コード例 #6
0
ファイル: test.py プロジェクト: Prakti/roman-numerals-dojo
 def test_IV_to_4(self):
     self.assertEqual(roman.to_arabic("IV"), 4)
コード例 #7
0
ファイル: test.py プロジェクト: Prakti/roman-numerals-dojo
 def test_I_to_1(self):
     self.assertEqual(roman.to_arabic("I"), 1)
コード例 #8
0
ファイル: test_roman.py プロジェクト: jorgearanda/katas
def test_all():
    for i in range(1, 4000):
        assert i == to_arabic(to_roman(i))
コード例 #9
0
ファイル: test_roman.py プロジェクト: jorgearanda/katas
def test_II():
    assert 2 == to_arabic("II")
コード例 #10
0
ファイル: test_roman.py プロジェクト: jorgearanda/katas
def test_I():
    assert 1 == to_arabic("I")
コード例 #11
0
def test_900():
    actual = to_arabic('cm')
    expected = 900
    assert actual == expected
コード例 #12
0
def test_1000():
    actual = to_arabic('M')
    expected = 1000
    assert actual == expected
コード例 #13
0
def test_3999():
    actual = to_arabic('mmmcmxcix')
    expected = 3999
    assert actual == expected
コード例 #14
0
def test_1984():
    actual = to_arabic('mcmlxxxiv')
    expected = 1984
    assert actual == expected