Added few edge cases to the test suite
This commit is contained in:
parent
c3b6f95cfb
commit
8b42d43574
|
|
@ -57,6 +57,17 @@ def test_duplicated_sort():
|
||||||
|
|
||||||
assert send_to_goulag(inputlist) == expectedList
|
assert send_to_goulag(inputlist) == expectedList
|
||||||
|
|
||||||
|
def test_list_with_zero_and_negatives():
|
||||||
|
inputlist = [0,50,-5,2,-10,7,15]
|
||||||
|
expectedList = sorted(copy.deepcopy(inputlist))
|
||||||
|
|
||||||
|
assert send_to_goulag(inputlist) == expectedList
|
||||||
|
|
||||||
|
def test_many_duplicates():
|
||||||
|
input_list = [7, 2, 7, 7, 1, 7, 3, 7]
|
||||||
|
expected_list = sorted(input_list[:])
|
||||||
|
assert send_to_goulag(input_list[:]) == expected_list
|
||||||
|
|
||||||
def test_really_long_sort():
|
def test_really_long_sort():
|
||||||
inputList = [random.randint(1,500000) for _ in range(10000)]
|
inputList = [random.randint(1,500000) for _ in range(10000)]
|
||||||
expectedList = sorted(copy.deepcopy(inputList))
|
expectedList = sorted(copy.deepcopy(inputList))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue