Exemple #1
0
 def testZeroByTwo(self):
     self.assertAlmostEqual(hw.dot([], [1, 0]),
                            0,
                            msg="Make sure the lengths are the same!")
Exemple #2
0
 def testTwoByThree(self):
     self.assertAlmostEqual(hw.dot([5, 3], [6, 8, 42]),
                            0,
                            msg="Make sure the lengths are the same!")
Exemple #3
0
 def testTwoByTwoToZero(self):
     self.assertAlmostEqual(hw.dot([3, 4], [1, 0]), 3)
Exemple #4
0
 def testTwoByTwo(self):
     self.assertAlmostEqual(hw.dot([5, 3], [6, 4]), 42)
 def testZeroByTwo(self):
     self.assertAlmostEqual(hw.dot([],[1,0]),0, msg="Make sure the lengths are the same!")
 def testTwoByTwoToZero(self):
     self.assertAlmostEqual(hw.dot([3,4],[1,0]),3)
 def testTwoByThree(self):
     self.assertAlmostEqual(hw.dot([5,3],[6,8,42]),0, msg="Make sure the lengths are the same!")
 def testTwoByTwo(self):
     self.assertAlmostEqual(hw.dot([5,3],[6,4]),42)