예제 #1
0
파일: test_tcc.py 프로젝트: huntipl/TCC
def test_empty_array_split_returns_empty_array(test_chunks):
    result = tcc.split_array([], test_chunks)
    expected = [[]]
    assert expected == result
예제 #2
0
파일: test_tcc.py 프로젝트: huntipl/TCC
def test_array_dividing_with_remainder_splits_into_n_minus_1_even_chunks_and_remainder_in_the_last_chunk(
        test_array, test_chunks, expected):
    assert expected == tcc.split_array(test_array, test_chunks)
예제 #3
0
파일: test_tcc.py 프로젝트: huntipl/TCC
def test_array_dividing_without_remainder_splits_into_n_even_chunks(
        test_array, test_chunks, expected):
    assert expected == tcc.split_array(test_array, test_chunks)
예제 #4
0
파일: test_tcc.py 프로젝트: huntipl/TCC
def test_input_array_is_type_of_array_list_set_etc(test_array):
    with pytest.raises(ValueError):
        tcc.split_array(test_array, 1)
예제 #5
0
파일: test_tcc.py 프로젝트: huntipl/TCC
def test_chunks_not_a_integer_raises_valueerror_exception(test_chunks):
    with pytest.raises(ValueError):
        tcc.split_array([], test_chunks)
예제 #6
0
파일: test_tcc.py 프로젝트: huntipl/TCC
def test_split_to_less_than_1_chunks_raises_valueerror_exception(test_chunks):
    with pytest.raises(ValueError):
        tcc.split_array([], test_chunks)