예제 #1
0
 def setUp(self):
     self.test_list = [1, 2, 3]
     self.result = insert_val_at(2, self.test_list, 4)
     self.result2 = insert_val_at(6, self.test_list, 3)
예제 #2
0
    def setUp(self):
        self.test_list = [0, 1, 2, 3, 4]
        self.result = insert_val_at(2, self.test_list[:], 100)

        self.result2 = insert_val_at(7, self.test_list[:], 100)
예제 #3
0
	def setUp(self):
		self.test_list = [0,1,2,3,4]
		self.result = insert_val_at(2, self.test_list, 100)
		self.result2 = insert_val_at(6, self.test_list, 100)
예제 #4
0
 def testReturnFalseForInvalidIndex(self):
     self.test_list = [0,1,2,3,4]
     self.result = insert_val_at(5, self.test_list, 100)
     return self.assertEqual(False, self.result)
예제 #5
0
 def setUp(self):
     self.test_list = [0, 1, 2, 3, 4]
     self.result = insert_val_at(2, self.test_list, 100)
     print "first", self.result
     self.result2 = insert_val_at(6, self.test_list, 100)
     print "second", self.result2
 def setUp(self):
     self.test_list = [0,1,2,3,4]
     self.result1 = insert_val_at(2, self.test_list, 100)
     self.result2 = insert_val_at(8, self.test_list, 100)
예제 #7
0
    def setUp(self):
		self.test_list = [0,1,2,3,4]
		self.result = insert_val_at(2, self.test_list, 100)
		print "first", self.result
		self.result2 = insert_val_at(6,self.test_list,100)
		print "second", self.result2