Exemple #1
0
 def test_checkRow(self):
     arrTemp = [
         10, 9, 7, 6, '', 4, 3, 2, '', 0
     ]  #create a temporary array with missing values  then use this array with missing values and if the original code works it should return false
     prev = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
     result = datamunger.check_row(1, prev, arrTemp)
     self.assertEqual(result, False)
Exemple #2
0
 def test_row2(self):
     n = 53
     prev = [
         '1856', '232', '279', '169', '254', '358', '314', '109', '141',
         '190'
     ]
     curr = [1955, 240, 295, 175, 270, 366, 357, 119, 133, 192]
     result = datamunger.check_row(n, prev, curr)
     self.assertEqual(result, False)
Exemple #3
0
 def test_row1(self):
     n = 20
     prev = ['811', '78', '146', '55', '51', '254', '103', '57', '67', '0']
     curr = [823, 82, 147, 55, 53, 256, 104, 58, 68, 0]
     result = datamunger.check_row(n, prev, curr)
     self.assertEqual(result, True)
Exemple #4
0
	def test_Check_Row_Fail(self):
		listCurrent = "342, , 14, 28, 35, 47, 58, 75, 84, 90"
		ThisList = listCurrent.split(",")
		prev = [0,10,20,30,40,50,60,70,80,90,100]
		result = datamunger.check_row(1, prev, ThisList)
		self.assertFalse(result)
Exemple #5
0
 def test_Testrowfail(self):
     curr = "440,20,30,,50,60,70,80,90,100"
     currlist = curr.split(",")
     prev = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90]
     result = datamunger.check_row(1, prev, currlist)
     self.assertFalse(result)