renaming now that I am going to be adding merge sort

This commit is contained in:
Dan Buch 2011-08-15 22:01:05 -04:00
parent 828a0287fd
commit 7f555fbe56
2 changed files with 6 additions and 6 deletions

View File

@ -1,17 +1,17 @@
import random import random
import unittest import unittest
import insertion_sort01 import sorting
class Test(unittest.TestCase): class TestInsertionSort(unittest.TestCase):
def test_example(self): def test_example(self):
tmpl = [8, 2, 4, 9, 3, 6] tmpl = [8, 2, 4, 9, 3, 6]
a = tmpl[:] a = tmpl[:]
expected = [2, 3, 4, 6, 8, 9] expected = [2, 3, 4, 6, 8, 9]
insertion_sort01.insertion_sort(a) sorting.insertion_sort(a)
self.assertEqual(expected, a) self.assertEqual(expected, a)
@ -21,7 +21,7 @@ class Test(unittest.TestCase):
random.shuffle(a) random.shuffle(a)
expected = tmpl[:] expected = tmpl[:]
insertion_sort01.insertion_sort(a) sorting.insertion_sort(a)
self.assertEqual(expected, a) self.assertEqual(expected, a)
@ -30,7 +30,7 @@ class Test(unittest.TestCase):
a = list(reversed(tmpl[:])) a = list(reversed(tmpl[:]))
expected = tmpl[:] expected = tmpl[:]
insertion_sort01.insertion_sort(a) sorting.insertion_sort(a)
self.assertEqual(expected, a) self.assertEqual(expected, a)
@ -40,7 +40,7 @@ class Test(unittest.TestCase):
random.shuffle(a) random.shuffle(a)
expected = tmpl[:] expected = tmpl[:]
insertion_sort01.insertion_sort(a) sorting.insertion_sort(a)
self.assertEqual(expected, a) self.assertEqual(expected, a)