Beispiel #1
0
 def testFirstNeg(self):
     self.assertAlmostEqual(
         hw.mult(-3, 5),
         -15,
         msg=
         "Remember that multiplying a negative by a number is the opposite of multiplying the negative of the negative"
     )
Beispiel #2
0
 def testFirstZero(self):
     self.assertAlmostEqual(hw.mult(0, 4),
                            0,
                            msg="Make sure you have a base case for 0")
Beispiel #3
0
 def testPositives(self):
     self.assertAlmostEqual(hw.mult(6, 7), 42)
Beispiel #4
0
 def testSecondZero(self):
     self.assertAlmostEqual(hw.mult(4, 0),
                            0,
                            msg="Make sure you have a base case for 0")
 def testBothNeg(self):
     self.assertAlmostEqual(hw.mult(-3,-5), 15, msg="Remember that multiplying a negative by a number is the opposite of multiplying the negative of the negative")
 def testPositives(self):
     self.assertAlmostEqual(hw.mult(6,7), 42)
 def testFirstZero(self):
     self.assertAlmostEqual(hw.mult(0,4), 0, msg="Make sure you have a base case for 0")
 def testSecondZero(self):
     self.assertAlmostEqual(hw.mult(4,0), 0, msg="Make sure you have a base case for 0")