Beispiel #1
0
 def test_five(self):
     inputs = [1, 2, 3, 4, 5]
     outputs = [-4, -2, 0, 2, 4]
     self.assertEqual(reverse_difference(inputs), outputs)
Beispiel #2
0
 def test_four(self):
     self.assertEqual(reverse_difference([9, 8, 7, 6]), [3, 1, -1, -3])
Beispiel #3
0
 def test_three(self):
     self.assertEqual(reverse_difference([3, 2, 1]), [2, 0, -2])
Beispiel #4
0
 def test_two(self):
     self.assertEqual(reverse_difference([0, 0]), [0, 0])
Beispiel #5
0
 def test_one(self):
     self.assertEqual(reverse_difference([1]), [0])
Beispiel #6
0
 def test_empty(self):
     self.assertEqual(reverse_difference([]), [])