Пример #1
0
 def test_three_items(self):
     numbers = [1, 2, 3]
     swap_ends(numbers)
     self.assertEqual(numbers, [3, 2, 1])
Пример #2
0
 def test_two_items(self):
     numbers = [1, 2]
     swap_ends(numbers)
     self.assertEqual(numbers, [2, 1])
Пример #3
0
 def test_one_item(self):
     numbers = [1]
     swap_ends(numbers)
     self.assertEqual(numbers, [1])
Пример #4
0
 def test_return_value_is_None(self):
     numbers = [1, 2, 3, 4, 5]
     self.assertIsNone(swap_ends(numbers))
Пример #5
0
 def test_five_items(self):
     numbers = [1, 2, 3, 4, 5]
     swap_ends(numbers)
     self.assertEqual(numbers, [5, 2, 3, 4, 1])
Пример #6
0
 def test_four_items(self):
     numbers = [1, 2, 3, 4]
     swap_ends(numbers)
     self.assertEqual(numbers, [4, 2, 3, 1])