コード例 #1
0
def test_multiprocess_func_does_something():
    q = Queue()
    multiprocess(lambda q, x: q.push(x), [(q, 1), (q, 2)])
    arr = []
    while not q.empty():
        arr.append(q.pop())
    assert (set([1, 2]) == set(arr))