diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 08:28:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 08:28:15 +0000 |
commit | 5caf47878e273d78509aaeb23100995c26af0d0f (patch) | |
tree | 37bdab1f4549257dec4534d48619a2c510eddc3b /tests/tests_asyncio.py | |
parent | Releasing debian version 4.66.4-2. (diff) | |
download | tqdm-5caf47878e273d78509aaeb23100995c26af0d0f.tar.xz tqdm-5caf47878e273d78509aaeb23100995c26af0d0f.zip |
Merging upstream version 4.66.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/tests_asyncio.py')
-rw-r--r-- | tests/tests_asyncio.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/tests_asyncio.py b/tests/tests_asyncio.py index bdef569..250e658 100644 --- a/tests/tests_asyncio.py +++ b/tests/tests_asyncio.py @@ -48,10 +48,14 @@ async def test_generators(capsys): _, err = capsys.readouterr() assert '9it' in err - with tqdm(acount(), desc="async_counter") as pbar: - async for i in pbar: - if i >= 8: - break + acounter = acount() + try: + with tqdm(acounter, desc="async_counter") as pbar: + async for i in pbar: + if i >= 8: + break + finally: + await acounter.aclose() _, err = capsys.readouterr() assert '9it' in err |