Exemple #1
0
def test_from_to_iterable_pipe(nums):

    nums_py = nums

    nums_pl = (nums | pr.from_iterable() | list)

    assert nums_pl == nums_py
Exemple #2
0
def test_from_to_iterable(nums):

    nums_py = nums

    nums_pl = pr.from_iterable(nums)
    nums_pl = list(nums_pl)

    assert nums_pl == nums_py
Exemple #3
0
def test_from_to_iterable(nums):

    nums_pl = nums
    nums_pl = pr.from_iterable(nums_pl)
    nums_pl = cz.partition_all(10, nums_pl)
    nums_pl = pr.map(sum, nums_pl)
    nums_pl = list(nums_pl)

    nums_py = nums
    nums_py = cz.partition_all(10, nums_py)
    nums_py = map(sum, nums_py)
    nums_py = list(nums_py)

    assert nums_py == nums_pl