def testUsersPrimitiveFromRequiredModuleAsReturnValue(self): '''Complex Number::toComplex()''' number = Number(12) cpx = number.toComplex() self.assertEqual(number.value(), int(cpx.real))
def testUsersPrimitiveFromRequiredModuleAsReturnValue(self): """Complex Number::toComplex()""" number = Number(12) cpx = number.toComplex() self.assertEqual(number.value(), int(cpx.real))
def testNumber(self): '''Basic test to see if the Number class is Ok.''' value = 123 num = Number(value) self.assertEqual(num.value(), value)
def testPointTimesNumber(self): '''sample.Point * other.Number''' pt = Point(2, 7) num = Number(11) self.assertEqual(pt * num.value(), pt * 11)