|
|
|
@ -15,7 +15,7 @@ class Test(unittest.TestCase):
|
|
|
|
|
|
|
|
|
|
self.assertEqual(expected, a)
|
|
|
|
|
|
|
|
|
|
def test_big_example(self):
|
|
|
|
|
def test_100_example(self):
|
|
|
|
|
tmpl = list(range(0, 1000))
|
|
|
|
|
a = tmpl[:]
|
|
|
|
|
random.shuffle(a)
|
|
|
|
@ -25,8 +25,17 @@ class Test(unittest.TestCase):
|
|
|
|
|
|
|
|
|
|
self.assertEqual(expected, a)
|
|
|
|
|
|
|
|
|
|
def test_bigger_example(self):
|
|
|
|
|
tmpl = list(range(0, 10000))
|
|
|
|
|
def test_reversed_100_example(self):
|
|
|
|
|
tmpl = list(range(0, 1000))
|
|
|
|
|
a = list(reversed(tmpl[:]))
|
|
|
|
|
expected = tmpl[:]
|
|
|
|
|
|
|
|
|
|
insertion_sort01.insertion_sort(a)
|
|
|
|
|
|
|
|
|
|
self.assertEqual(expected, a)
|
|
|
|
|
|
|
|
|
|
def test_1000_example(self):
|
|
|
|
|
tmpl = list(range(0, 1000))
|
|
|
|
|
a = tmpl[:]
|
|
|
|
|
random.shuffle(a)
|
|
|
|
|
expected = tmpl[:]
|
|
|
|
|