Sha256: ff202f07f44b8afc473bd3b3feac7f390641a2ba7f915db12e973169d66873b6

Contents?: true

Size: 655 Bytes

Versions: 26

Compression:

Stored size: 655 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

26 entries across 26 versions & 1 rubygems

Version Path
trackler-2.0.3.0 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.2.0 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.1.2 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.1.1 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.1.0 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.0.10 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.0.9 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.0.8 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.0.7 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.0.6 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.0.5 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.0.4 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.0.3 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.0.2 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.0.1 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-2.0.0.0 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-1.0.4.1 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-1.0.4.0 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-1.0.3.0 tracks/python/exercises/roman-numerals/roman_numerals_test.py
trackler-1.0.2.1 tracks/python/exercises/roman-numerals/roman_numerals_test.py