def test_three_items(self): numbers = [1, 2, 3] swap_ends(numbers) self.assertEqual(numbers, [3, 2, 1])
def test_two_items(self): numbers = [1, 2] swap_ends(numbers) self.assertEqual(numbers, [2, 1])
def test_one_item(self): numbers = [1] swap_ends(numbers) self.assertEqual(numbers, [1])
def test_return_value_is_None(self): numbers = [1, 2, 3, 4, 5] self.assertIsNone(swap_ends(numbers))
def test_five_items(self): numbers = [1, 2, 3, 4, 5] swap_ends(numbers) self.assertEqual(numbers, [5, 2, 3, 4, 1])
def test_four_items(self): numbers = [1, 2, 3, 4] swap_ends(numbers) self.assertEqual(numbers, [4, 2, 3, 1])