def testFloats(self): for x in range(-10, 10): for y in range(-10, 10): x = x / 10.0 y = y / 10.0 p = my_math.product(x, y) self.assertTrue(p == x * y, 'Float multiplication failed')
def testFloater(self): for x in xrange(-10,10): for y in xrange(-10,10): x/=10.0 y/=10.0 p=my_math.product(x, y) self.failUnless(p==x*y,'Flaot multiplication failed!')
def testFloat(self): for x in xrange(-10, 10): for y in xrange(-10, 10): x = x / 10.0 y = y / 10.0 p = my_math.product(x, y) self.failUnless(p == x * y, 'Float multiplication failed')
def testFloats(self): for x in xrange(-10, 10): for y in xrange(-10, 10): x = x / 10.0 y = y / 10.0 p = my_math.product(x, y) self.failUnless(p == x * y, 'Float multiplication failed')
def test_float(self): for x in range(-10, 10): for y in range(-10, 10): x = x / 10 y = y / 10 p = my_math.product(x, y) self.assertEqual(p, x * y, 'Float multiplication failed')
def testIntegers(self): for x in range(-10, 10): for y in range(-10, 10): p = my_math.product(x, y) self.assertTrue(p == x * y, 'Integer multiplication failed')
def testIntegers(self): for x in xrange(-10, 10): for y in xrange(-10, 10): p = my_math.product(x, y) self.failUnless(p == x * y, 'Integer multiplication failed')
def testIntegers(self): for x in range(-10, 10): for y in range(-10, 10): p = my_math.product(x, y) self.assertTrue(p == x*y, 'Integer multiplication failed')
def testFloat(self): for x in range(-10, 10): for y in range(-10, 10): p = my_math.product(x / 10.0, y / 10.0) self.failUnless(p == (x / 10.0) * (y / 10.0), "Integer multiplication failed")
def test_product(): assert my_math.product(5, 5) == 25 assert my_math.product(5, 2.5) == 12.5
def test_product(): assert my_math.product(7, 3) == 21 assert my_math.product(7, -1) == -7 assert my_math.product(3, 3) == 9
def test_product(): assert my_math.product(3, 6) == 18 assert my_math.product(5, 5) == 25
def multisum_length(degrees): return product([sum_length(degree) for degree in degrees])
def test_product(): assert my_math.product(7, 3) == 21 assert my_math.product(7, -1) == -7 assert my_math.product(4.3, 5.3) == 22.79
def testFloat(self): for x in range(-10, 10): for y in range(-10, 10): p = my_math.product(x/10.0, y/10.0) self.failUnless(p == (x/10.0) * (y/10.0), "Integer multiplication failed")
def test_integer_product(self): for x in range(-10, 10): for y in range(-10, 10): p = my_math.product(x, y) self.assertEqual(p, x * y, 'Integer multiplication failed')
def test_product(): assert my_math.product(3, 3) == 9 assert my_math.product(10, 1) == 10 assert my_math.product(20, 0.5) == 10 assert my_math.product(10, -1) == -10 assert my_math.product(10, 0) == 0