def test_round_trip(self): '''should return valid roman numeral from integer, and then back to integer''' # for number, numeral in self.known_values: for integer in range(1, 4000): roman = roman1.to_roman(integer) round_trip_number = roman1.from_roman(roman) self.assertEqual(integer, round_trip_number)
def test_from_roman_known_values(self): '''from_roman(to_roman(n)) == n for all n''' # self.assertEqual(roman1.from_roman('MMMMCMXCIX'), 4999) for integer in range(1, 5000): numeral = roman1.to_roman(integer) result = roman1.from_roman(numeral) self.assertEqual(integer, result)
def test_roundtrip(self): '''from_roman(to_roman(n))==n fpr all n''' for integer in range(1, 4000): numeral = roman1.to_roman(integer) result = roman1.from_roman(numeral) self.assertEqual(integer, result)
def test_from_roman_known_values(self): """from_roman should give known result with known input""" for integer, numeral in self.known_values: result = roman1.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 = roman1.to_roman(integer) result = roman1.from_roman(numeral) self.assertEqual(integer, result)
def test_from_roman_known_values(self): '''from_roman should give known result with known input''' for integer, numeral in self.known_values: result = roman1.from_roman(numeral) self.assertEqual(integer, result)
def test_roundtrip(self): for integer in range(1, 4000): numeral = roman1.to_roman(integer) result = roman1.from_roman(numeral) self.assertEqual(integer, result)
def test_to_number_known_values(self): '''to_nmber should return an integer based on valid roman numeral input''' for number, numeral in self.known_values: result = roman1.from_roman(numeral) self.assertEqual(number, result)
def test_round_trip(self): """from_roman(to_roman(n)) should equals to n""" for integer in range(1,5000): result = roman1.from_roman(roman1.to_roman(integer)) self.assertEqual(result,integer)
def test_roundtrip(self): ''' from_roman(to_roman(n)) == n for n = (1...3999) ''' for num in range(1, 4000): numeral = roman1.to_roman(num) result = roman1.from_roman(numeral) self.assertEqual(result, num)
def test_Roundtrip(self): for integer in range(1, 4000): numeral = roman1.to_roman(integer) result = roman1.from_roman(numeral) self.assertEqual(integer, result)
def test_from_roman_known_values(self): for integer, numeral in self.known_values: result = roman1.from_roman(numeral) self.assertEqual(integer, result)