Пример #1
0
async def test_product_produces_correct_lengths():
    """Check that product produces the right number of results per tuple."""
    assert len((await aitertools.alist(
        aitertools.product(*[range(7)] * 6)
    ))) == 7**6
Пример #2
0
async def test_product_zero_iterables(args, expected):
    """Check that product returns empty tuple when there are no iterables."""
    assert (await aitertools.alist(
        aitertools.product(*args)
    )) == expected