예제 #1
0
파일: test.py 프로젝트: durakin/PythonLab6
def test_list_with_inner_list():
    with pytest.raises(TypeError):
        quick_sort([[]])
예제 #2
0
파일: test.py 프로젝트: durakin/PythonLab6
def test_fine_list():
    assert quick_sort([10, 0, 0, -1, 15, -3, -3]) == [-3, -3, -1, 0, 0, 10, 15]
예제 #3
0
파일: test.py 프로젝트: durakin/PythonLab6
def test_not_int():
    with pytest.raises(TypeError):
        quick_sort([1, 0.5])
예제 #4
0
파일: test.py 프로젝트: durakin/PythonLab6
def test_list_of_one():
    assert quick_sort([1]) == [1]
예제 #5
0
파일: test.py 프로젝트: durakin/PythonLab6
def test_sorted_list():
    assert quick_sort([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]
예제 #6
0
파일: test.py 프로젝트: durakin/PythonLab6
def test_empty_list():
    assert quick_sort([]) == []