def test_sort_inverted_list(self): input = range(100) input.reverse() selection_sort.sort(input) self.assertEqual(range(100), input)
def test_sort_two_elements_list(self): input = range(2) random.shuffle(input) selection_sort.sort(input) self.assertEqual(range(2), input)
def test_sort_empty_list(self): input = range(0) selection_sort.sort(input) self.assertEqual(range(0), input)
def test_sort_one_element_list(self): input = range(1) selection_sort.sort(input) self.assertEqual(range(1), input)
def test_sort(self): input = range(100) random.shuffle(input) selection_sort.sort(input) self.assertEqual(range(100), input)