def test_from_roman_known_values(self): ''' from_roman should give known result with known input ''' for integer, numeral in self.known_values: result = test_roman2.from_roman(numeral) self.assertEqual(integer, result)
def test_roundtrip(self): ''' from_roman(to_roman(n)) == n for all n ''' for integer in range(1,5000): numeral = test_roman2.to_roman(integer) result = test_roman2.from_roman(numeral) self.assertEqual(integer, result)