def testSanity(self): """fromNegative(toNegative(n))==n for all n""" for integer in range(1, 100): numeral = negative.toNegative(integer) result = negative.fromNegative(numeral) self.assertEqual(integer, result)
def testToNegativeKnownValues(self): """toneagtive should give known result with known input""" for integer,numeral in self.knownValues: result = negative.toNegative(integer) self.assertEqual(numeral, result)