def testFloats(self):
		for x in xrange(-10, 10):
			for y in xrange(-10, 10):
				x = x/10.0
				y = y/10.0
				p = doctest_my_math.product(x, y)
				self.failUnless(p == x*y, 'Float multiplication failed')
Ejemplo n.º 2
0
 def testFloats(self):
     for x in xrange(-10, 10):
         for y in xrange(-10, 10):
             x = x / 10.0
             y = y / 10.0
             p = doctest_my_math.product(x, y)
             self.failUnless(p == x * y, 'Float multiplication failed')
	def testIntegers(self):
		for x in xrange(-10, 10):
			for y in xrange(-10, 10):
				p = doctest_my_math.product(x, y)
				self.failUnless(p == x*y, 'Integer multiplication failed')
Ejemplo n.º 4
0
 def testIntegers(self):
     for x in xrange(-10, 10):
         for y in xrange(-10, 10):
             p = doctest_my_math.product(x, y)
             self.failUnless(p == x * y, 'Integer multiplication failed')