Ejemplo n.º 1
0
def test_empty_array_split_returns_empty_array(test_chunks):
    result = tcc.split_array([], test_chunks)
    expected = [[]]
    assert expected == result
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
def test_input_array_is_type_of_array_list_set_etc(test_array):
    with pytest.raises(ValueError):
        tcc.split_array(test_array, 1)
Ejemplo n.º 5
0
def test_chunks_not_a_integer_raises_valueerror_exception(test_chunks):
    with pytest.raises(ValueError):
        tcc.split_array([], test_chunks)
Ejemplo n.º 6
0
def test_split_to_less_than_1_chunks_raises_valueerror_exception(test_chunks):
    with pytest.raises(ValueError):
        tcc.split_array([], test_chunks)