Sha256: 7bd4b53cae501e3d5e4d738f17029cb8099d270ce94f5375b2209804e141c385

Contents?: true

Size: 656 Bytes

Versions: 101

Compression:

Stored size: 656 Bytes

Contents

import unittest

import roman_numerals


class RomanTest(unittest.TestCase):
    numerals = {
        1: 'I',
        2: 'II',
        3: 'III',
        4: 'IV',
        5: 'V',
        6: 'VI',
        9: 'IX',
        27: 'XXVII',
        48: 'XLVIII',
        59: 'LIX',
        93: 'XCIII',
        141: 'CXLI',
        163: 'CLXIII',
        402: 'CDII',
        575: 'DLXXV',
        911: 'CMXI',
        1024: 'MXXIV',
        3000: 'MMM',
    }

    def test_numerals(self):
        for arabic, numeral in self.numerals.items():
            self.assertEqual(numeral, roman_numerals.numeral(arabic))


if __name__ == '__main__':
    unittest.main()

Version data entries

101 entries across 101 versions & 1 rubygems

Version Path
trackler-2.0.8.27 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.26 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.24 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.23 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.22 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.21 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.20 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.19 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.18 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.17 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.16 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.15 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.14 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.13 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.12 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.11 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.10 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.9 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.8 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.8.7 tracks/python/exercises/roman-numerals/roman_numerals_test.py