def test_to_roman_known_values(self): '''`to_roman` should give known result with known input''' for integer, numeral in self.known_values: result = arb2rom2arb.to_roman(integer) self.assertEqual(numeral, result)
def test_roundtrip(self): '''the output of `from_roman(to_roman(n)) should equal to n''' for integer in range(1, 4000): numeral = arb2rom2arb.to_roman(integer) result = arb2rom2arb.from_roman(numeral) self.assertEqual(integer, result)