예제 #1
0
파일: tests.py 프로젝트: Xassie/bananas
def test_quicks_int_input():
    assert qs.quicks([
        51,
        26,
        478,
        5,
    ]) == [5, 26, 51, 478]
    assert qs.quicks([
        56,
        415,
        54,
        33,
    ]) == [33, 54, 56, 415]
예제 #2
0
파일: __main__.py 프로젝트: Xassie/bananas
def main():
    num, test = cmd()
    num = qsort.checkitem(num)
    if test:
        pytest.main(['-v', 'functional\\tests.py'])
    if num:
        print(qsort.quicks(num))
예제 #3
0
파일: tests.py 프로젝트: Xassie/bananas
def test_quicks_empty():
    assert qs.quicks([]) == []
예제 #4
0
파일: tests.py 프로젝트: Xassie/bananas
def test_quicks_sing_num():
    assert qs.quicks([17]) == [17]
예제 #5
0
파일: tests.py 프로젝트: Xassie/bananas
def test_quicks_mixed():
    assert qs.quicks([-35, 64, 13.67, 31, -76]) == [-76, -35, 13.67, 31, 64]
예제 #6
0
파일: tests.py 프로젝트: Xassie/bananas
def test_quicks_error_string():
    assert qs.quicks(['like', 'I', 'trains']) == ['I', 'like', 'trains']
예제 #7
0
파일: tests.py 프로젝트: Xassie/bananas
def test_quicks_negatives():
    assert qs.quicks([-14, -35, -650]) == [-650, -35, -14]
    assert qs.quicks([-46, -64, -7]) == [-64, -46, -7]
예제 #8
0
파일: tests.py 프로젝트: Xassie/bananas
def test_quicks_float_input():
    assert qs.quicks([54.52, 54.65, 12.56]) == [12.56, 54.52, 54.65]
    assert qs.quicks([65.21, 89.54, 21.63]) == [21.63, 65.21, 89.54]