from src.utils.roman import Roman while True: try: print(' Insira um número entre 1 e 3000\n') number = input('>>> \n') if Roman.convert_digits(number=number): print(Roman.convert_digits(number=number)) else: print(' Número inválido!\n') except KeyboardInterrupt: exit(0)
def test_equal_1(self): self.assertEqual(Roman.convert_digits('1'), 'I')
def test_equal_2(self): self.assertEqual(Roman.convert_digits('200'), 'CC')
def test_false_3(self): self.assertFalse(Roman.convert_digits('ABC'))
def test_false_2(self): self.assertFalse(Roman.convert_digits('3001'))
def test_false_1(self): self.assertFalse(Roman.convert_digits('0'))
def test_equal_4(self): self.assertEqual(Roman.convert_digits('2998'), 'MMCMXCVIII')
def test_equal_3(self): self.assertEqual(Roman.convert_digits('1700'), 'MDCC')