  
  class TestSelectionSort(object):
  
      def test_selection_sort(self, func):
          print('Empty input')
          data = []
          func(data)
          assert_equal(data, [])
  
 
</s> remove         test.test_selection_sort(selection_sort_iterative)
 </s> add         test.test_selection_sort(selection_sort_recursive)
        test.test_selection_sort(selection_sort_iterative_alt) </s> remove     "* Empty input -> []\n",
 </s> add     "* None -> None\n",
    "* [] -> []\n", </s> remove     "def selection_sort_iterative(data):\n",
 </s> add     "def find_min_index(data, start):\n",
    "    min_index = start\n",
    "    for i in range(start + 1, len(data)):\n",
    "        if data[i] < data[min_index]:\n",
    "            min_index = i\n",
    "    return min_index\n",
    "\n",
    "\n",
    "def swap(data, i, j):\n",
    "    if (i != j):\n",
    "        data[i], data[j] = data[j], data[i]\n",
    "\n",
    "\n",
    "def selection_sort_recursive(data, start=0):\n",
    "    if data is None:\n",
    "        return None\n",
    "    if start < len(data) - 1:\n",
    "        swap(data, start, find_min_index(data, start))\n",
    "        selection_sort_recursive(data, start+1)\n",
    "\n",
    "\n",
    "def selection_sort_iterative_alt(data):\n",
    "    if data is None:\n",
    "        return None\n",
        print('None input')
        data = None
        func(data)
        assert_equal(data, None)

  
  class TestSelectionSort(object):
  
      def test_selection_sort(self, func):
        print('None input')
        data = None
        func(data)
        assert_equal(data, None)

          print('Empty input')
          data = []
          func(data)
          assert_equal(data, [])
  
keep keep keep add keep keep keep keep keep
 Polish selection sort challenge and solution 
sorting_searching/selection_sort/test_selection_sort.py