import unittest
import random
import copy

from python_algorithms import insertion_sort
from tests import print_timing, test_sort


class TestInsertionSort(test_sort.TestSort):

    @print_timing.print_timing
    def test_insertion_sort(self):     
        # Generate an unsorted and sorted list of the same values
        # to verify a sort worked
        unsorted_list = random.sample(range(1000000), 500) 
        sorted_list = copy.copy(unsorted_list).sort()

        self.assertEqual(insertion_sort.insertion_sort(unsorted_list), sorted_list)

if __name__ == '__main__':
    unittest.main()
83cd506bfd1672068649a3166a265557af437c86
<mask token>


class TestInsertionSort(test_sort.TestSort):
    <mask token>


<mask token>

<mask token>


class TestInsertionSort(test_sort.TestSort):

    @print_timing.print_timing
    def test_insertion_sort(self):
        unsorted_list = random.sample(range(1000000), 500)
        sorted_list = copy.copy(unsorted_list).sort()
        self.assertEqual(insertion_sort.insertion_sort(unsorted_list),
            sorted_list)


<mask token>

<mask token>


class TestInsertionSort(test_sort.TestSort):

    @print_timing.print_timing
    def test_insertion_sort(self):
        unsorted_list = random.sample(range(1000000), 500)
        sorted_list = copy.copy(unsorted_list).sort()
        self.assertEqual(insertion_sort.insertion_sort(unsorted_list),
            sorted_list)


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

import unittest
import random
import copy
from python_algorithms import insertion_sort
from tests import print_timing, test_sort


class TestInsertionSort(test_sort.TestSort):

    @print_timing.print_timing
    def test_insertion_sort(self):
        unsorted_list = random.sample(range(1000000), 500)
        sorted_list = copy.copy(unsorted_list).sort()
        self.assertEqual(insertion_sort.insertion_sort(unsorted_list),
            sorted_list)


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

import unittest
import random
import copy

from python_algorithms import insertion_sort
from tests import print_timing, test_sort


class TestInsertionSort(test_sort.TestSort):

    @print_timing.print_timing
    def test_insertion_sort(self):     
        # Generate an unsorted and sorted list of the same values
        # to verify a sort worked
        unsorted_list = random.sample(range(1000000), 500) 
        sorted_list = copy.copy(unsorted_list).sort()

        self.assertEqual(insertion_sort.insertion_sort(unsorted_list), sorted_list)

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