Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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