コード例 #1
0
ファイル: hw1pr3tests.py プロジェクト: raxod502/HMC-Grader
 def testZeroByTwo(self):
     self.assertAlmostEqual(hw.dot([], [1, 0]),
                            0,
                            msg="Make sure the lengths are the same!")
コード例 #2
0
ファイル: hw1pr3tests.py プロジェクト: raxod502/HMC-Grader
 def testTwoByThree(self):
     self.assertAlmostEqual(hw.dot([5, 3], [6, 8, 42]),
                            0,
                            msg="Make sure the lengths are the same!")
コード例 #3
0
ファイル: hw1pr3tests.py プロジェクト: raxod502/HMC-Grader
 def testTwoByTwoToZero(self):
     self.assertAlmostEqual(hw.dot([3, 4], [1, 0]), 3)
コード例 #4
0
ファイル: hw1pr3tests.py プロジェクト: raxod502/HMC-Grader
 def testTwoByTwo(self):
     self.assertAlmostEqual(hw.dot([5, 3], [6, 4]), 42)
コード例 #5
0
 def testZeroByTwo(self):
     self.assertAlmostEqual(hw.dot([],[1,0]),0, msg="Make sure the lengths are the same!")
コード例 #6
0
 def testTwoByTwoToZero(self):
     self.assertAlmostEqual(hw.dot([3,4],[1,0]),3)
コード例 #7
0
 def testTwoByThree(self):
     self.assertAlmostEqual(hw.dot([5,3],[6,8,42]),0, msg="Make sure the lengths are the same!")
コード例 #8
0
 def testTwoByTwo(self):
     self.assertAlmostEqual(hw.dot([5,3],[6,4]),42)