Exemple #1
0
def test_multimap():

    p = Pipe(["1234", "2345", "3456"])

    q = p.multi_map(a)

    assert q.list_items == ["2", "3", "4"]
Exemple #2
0
def test_multi_starmap_args():

    p = Pipe(["1234", "2345", "3456"])
    q = p.multi_map(b, args=(2,))
    assert q.list_items == ["3", "4", "5"]
Exemple #3
0
def test_multimap_sleep():

    p = Pipe(range(10))
    q = p.multi_map(sleeper, show_progress=True)
Exemple #4
0
def test_multimap_sleep_callable_obj():

    p = Pipe(range(10))
    q = p.multi_map(A(), show_progress=True)
Exemple #5
0
def test_multi_map_args_kwargs():

    p = Pipe(["1234", "2345", "3456"])
    q = p.multi_map(globalw, kwargs={"ind": 3})
    assert q.list_items == ["4", "5", "6"]