Adding upstream version 4.64.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-05 19:13:00 +01:00
parent ee08d9327c
commit 2da88b2fbc
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
89 changed files with 16770 additions and 0 deletions

26
tests/tests_itertools.py Normal file
View file

@ -0,0 +1,26 @@
"""
Tests for `tqdm.contrib.itertools`.
"""
import itertools as it
from tqdm.contrib.itertools import product
from .tests_tqdm import StringIO, closing
class NoLenIter(object):
def __init__(self, iterable):
self._it = iterable
def __iter__(self):
for i in self._it:
yield i
def test_product():
"""Test contrib.itertools.product"""
with closing(StringIO()) as our_file:
a = range(9)
assert list(product(a, a[::-1], file=our_file)) == list(it.product(a, a[::-1]))
assert list(product(a, NoLenIter(a), file=our_file)) == list(it.product(a, NoLenIter(a)))