"""
Sorting algorithms tests.
"""

import unittest
import sortings

class SelectionSortTest(unittest.TestCase):
    """
    Selection Sort tests.
    """

    def test_selection(self):
        """Simple test.
        """
        self.assertEquals(sortings.selection_sort([2, 1, 3]), [1, 2, 3])

class InsertionSortTest(unittest.TestCase):
    """
    Insertion Sort tests.
    """

    def test_insertion(self):
        """Simple test.
        """
        self.assertEquals(sortings.insertion_sort([2, 1, 3]), [1, 2, 3])

    def test_antisorted(self):
        """Sorts antisorted array.
        """
        items = range(10)
        self.assertEquals(sortings.insertion_sort(list(reversed(items))), items)        

if __name__ == "__main__":
    unittest.main()

@@ -182,37 +182,40 @@
 f):%0A        %22%22%22S
-imple
+election
  test.%0A        %22
@@ -423,14 +423,17 @@
  %22%22%22
-Simple
+Insertion
  tes
@@ -585,16 +585,47 @@
 ed array
+ using Insertion Sort algorithm
 .%0A      

Test comments