renaming now that I am going to be adding merge sort
This commit is contained in:
parent
828a0287fd
commit
7f555fbe56
@ -1,17 +1,17 @@
|
||||
import random
|
||||
import unittest
|
||||
|
||||
import insertion_sort01
|
||||
import sorting
|
||||
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
class TestInsertionSort(unittest.TestCase):
|
||||
|
||||
def test_example(self):
|
||||
tmpl = [8, 2, 4, 9, 3, 6]
|
||||
a = tmpl[:]
|
||||
expected = [2, 3, 4, 6, 8, 9]
|
||||
|
||||
insertion_sort01.insertion_sort(a)
|
||||
sorting.insertion_sort(a)
|
||||
|
||||
self.assertEqual(expected, a)
|
||||
|
||||
@ -21,7 +21,7 @@ class Test(unittest.TestCase):
|
||||
random.shuffle(a)
|
||||
expected = tmpl[:]
|
||||
|
||||
insertion_sort01.insertion_sort(a)
|
||||
sorting.insertion_sort(a)
|
||||
|
||||
self.assertEqual(expected, a)
|
||||
|
||||
@ -30,7 +30,7 @@ class Test(unittest.TestCase):
|
||||
a = list(reversed(tmpl[:]))
|
||||
expected = tmpl[:]
|
||||
|
||||
insertion_sort01.insertion_sort(a)
|
||||
sorting.insertion_sort(a)
|
||||
|
||||
self.assertEqual(expected, a)
|
||||
|
||||
@ -40,7 +40,7 @@ class Test(unittest.TestCase):
|
||||
random.shuffle(a)
|
||||
expected = tmpl[:]
|
||||
|
||||
insertion_sort01.insertion_sort(a)
|
||||
sorting.insertion_sort(a)
|
||||
|
||||
self.assertEqual(expected, a)
|
||||
|
Loading…
Reference in New Issue
Block a user