示例#1
0
 def test_emptylist(self):
     #Test if the function recives an empty list
     self.assertEqual(merge([]),None)
示例#2
0
 def test_negative(self):
     self.assertEqual(merge([-2,-2,-4,-4]),[-4,-8,0,0])
示例#3
0
 def test_full_list(self):
     #test for a full list
     self.assertEqual(merge([2,2,2,2]),[4,4,0,0])
示例#4
0
 def test_not_combine2(self):
     self.assertEqual(merge([2,2,4,4]),[4,8,0,0])
示例#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])