def test_equals(self):
     self.assertEqual(
         process_array([4, 8, 2, 7, 5], lambda val: val * 2),
         [8, 16, 4, 14, 10]
     )
 def test_equals_3(self):
     self.assertEqual(
         process_array([-1, 1, 2, 3, 4, 5], lambda val: val ** 3),
         [-1, 1, 8, 27, 64, 125]
     )
 def test_equals_4(self):
     self.assertEqual(process_array([], lambda val: val + 1), [])
 def test_equals_2(self):
     self.assertEqual(
         process_array([7, 8, 9, 1, 2], lambda val: val + 5),
         [12, 13, 14, 6, 7]
     )
Exemplo n.º 5
0
 def test_equals(self):
     self.assertEqual(process_array([4, 8, 2, 7, 5], lambda val: val * 2),
                      [8, 16, 4, 14, 10])
Exemplo n.º 6
0
 def test_equals_4(self):
     self.assertEqual(process_array([], lambda val: val + 1), [])
Exemplo n.º 7
0
 def test_equals_3(self):
     self.assertEqual(
         process_array([-1, 1, 2, 3, 4, 5], lambda val: val**3),
         [-1, 1, 8, 27, 64, 125])
Exemplo n.º 8
0
 def test_equals_2(self):
     self.assertEqual(process_array([7, 8, 9, 1, 2], lambda val: val + 5),
                      [12, 13, 14, 6, 7])