def test_interleaving_fails_with_non_iterables(it): """""" with raises(TypeError): tuple(_123_pype().interleave(it))
def test_asking_for_first_or_last_n_items_fails_with_non_int_n(n): """""" with raises(TypeError): tuple(_123_pype().take(n))
def test_teeing_fails_with_non_ints(n): """""" with raises(TypeError): tuple(_123_pype().tee(n))
def test_sorting_fails_with_non_callable_non_none_key(fn): """""" with raises(TypeError): tuple(_123_pype().sort(fn))
def test_splitting_fails_with_non_string_modes(mode): """""" with raises(TypeError): tuple(_123_pype().split(lambda n: n == 2, mode=mode))
def test_slicing_fails_with_negative_start(): """""" with raises(ValueError): tuple(_123_pype().slice(-1, 5))
def test_slicing_fails_with_start_larger_than_end(): """""" with raises(ValueError): tuple(_123_pype().slice(1, 0))
def test_mapping_fails_with_non_int_chunk_size(chunk_size): """""" with raises(TypeError): tuple(_123_pype().map(lambda x: x * 2, workers=2, chunk_size=chunk_size))
def test_mapping_fails_with_non_positive_chunk_size(): """""" with raises(ValueError): tuple(_123_pype().map(lambda x: x * 2, workers=2, chunk_size=-1))
def test_mapping_fails_with_non_int_workers(workers): """""" with raises(TypeError): tuple(_123_pype().map(lambda x: x * 2, workers=workers))
def test_mapping_fails_with_negative_workers(): """""" with raises(ValueError): tuple(_123_pype().map(lambda x: x * 2, workers=-1))
def test_multiple_mapping_fails_with_non_callable_function(fn): """""" with raises(TypeError): tuple(_123_pype().map(lambda x: x * 2, fn))
def test_interleaving_fails_with_non_int_n(n): """""" with raises(TypeError): tuple(_123_pype().interleave(_a_fun_day_pype(), n=n))
def test_interleaving_fails_with_non_positive_int(n): """""" with raises(ValueError): tuple(_123_pype().interleave(_a_fun_day_pype(), n=n))
def test_slicing_fails_with_non_int_start(n): """""" with raises(TypeError): tuple(_123_pype().slice(n, 5))
def test_partitioning_fails_with_non_callable_predicates(fn): """""" with raises(TypeError): for _ in _123_pype().partition(fn): pass
def test_slicing_fails_with_non_int_end(n): """""" with raises(TypeError): tuple(_123_pype().slice(1, n))
def test_printing_fails_with_non_callable_function(fn): """""" with raises(TypeError): tuple(_123_pype().print(fn))
def test_slicing_fails_with_negative_end(): """""" with raises(ValueError): tuple(_123_pype().slice(1, -1))
def test_broadcasting_fails_with_non_callables(fn): """""" with raises(TypeError): tuple(_123_pype().broadcast(fn))
def test_concatenation_fails_with_non_pypes(other): """""" with raises(TypeError): tuple(_123_pype().cat(other))
def test_reducing_fails_with_non_binary_reduction_callable(fn): """""" with raises(TypeError): tuple(_123_pype().reduce(fn))
def test_splitting_fails_with_non_callable_predicate(fn): """""" with raises(TypeError): tuple(_123_pype().split(fn))
def test_sampling_fails_with_non_int_n(n): """""" with raises(TypeError): tuple(_123_pype().sample(n))
def test_splitting_fails_with_unsupported_modes(): """""" with raises(ValueError): tuple(_123_pype().split(lambda n: n == 2, mode='non-existent'))
def test_sampling_fails_with_negative_n(): """""" with raises(ValueError): tuple(_123_pype().sample(-1))
def test_selecting_items_while_condition_is_met_fails_with_non_callable_predicate( fn): """""" with raises(TypeError): tuple(_123_pype().take_while(fn))
def test_selecting_items_fails_with_non_callable_predicate(fn): """""" with raises(TypeError): tuple(_123_pype().select(fn))
def test_teeing_fails_with_non_negatives(n): """""" with raises(ValueError): print(tuple(_123_pype().tee(n)))
def test_grouping_fails_with_non_callable_keys(fn): """""" with raises(TypeError): tuple(_123_pype().group_by(fn))