Ejemplo n.º 1
0
 def test_emptylist(self):
     #Test if the function recives an empty list
     self.assertEqual(merge([]),None)
Ejemplo n.º 2
0
 def test_negative(self):
     self.assertEqual(merge([-2,-2,-4,-4]),[-4,-8,0,0])
Ejemplo n.º 3
0
 def test_full_list(self):
     #test for a full list
     self.assertEqual(merge([2,2,2,2]),[4,4,0,0])
Ejemplo n.º 4
0
 def test_not_combine2(self):
     self.assertEqual(merge([2,2,4,4]),[4,8,0,0])
Ejemplo n.º 5
0
 def test_zerolist(self):
     
     #Test function to not merge values in
     #if lin is not 0:
     self.assertEqual(merge([0,0,0,0]),[0,0,0,0])