예제 #1
0
 def test_calcTotal(self):
     arrayTemp = [
         0, 1, 2, 3, 4, 5, 6, 7, 8, 9
     ]  #create a temporary array which represents a line from the .csv file
     total = 36  #this is the correct total (adding T1 throught T8)
     cal = datamunger.calc_total(arrayTemp)
     self.assertEqual(cal, total)
예제 #2
0
 def test_total(self):
     row = [811, 78, 146, 55, 51, 254, 103, 57, 67, 0]
     result = datamunger.calc_total(row)
     self.assertEqual(result, 811)
예제 #3
0
	def test_Calc_Total_Fail(self):
		ListNum = [432, 1, 14, 28, 35, 47, 63, 75, 84, 90]
		Check_Res = datamunger.calc_total(ListNum)
		self.assertNotEqual(Check_Res, ListNum[0])
예제 #4
0
	def test_Calc_Total_Pass(self):
		ListNum = [342, 1, 14, 28, 35, 47, 58, 75, 84, 90]
		Check_Res = datamunger.calc_total(ListNum)
		self.assertEqual(Check_Res, ListNum[0])
예제 #5
0
 def test_calctotalpass(self):
     TestNumbers = [360, 10, 20, 30, 40, 50, 60, 70, 80, 90]
     result = datamunger.calc_total(TestNumbers)
     self.assertEqual(result, TestNumbers[0])