From: Daniele Varrazzo Date: Sat, 11 Nov 2023 15:30:55 +0000 (+0000) Subject: chore: fix mypy >= 1.7 warning in tests X-Git-Tag: pool-3.2.1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bdd7d68a828b5b50a3bcf5528905a668502710b;p=thirdparty%2Fpsycopg.git chore: fix mypy >= 1.7 warning in tests --- diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py index c88475a2d..8d1fb0279 100644 --- a/tests/test_pipeline.py +++ b/tests/test_pipeline.py @@ -589,7 +589,7 @@ def test_concurrency(conn): from concurrent.futures import ThreadPoolExecutor with ThreadPoolExecutor() as e: - cursors = e.map(update, values, timeout=len(values)) + cursors = list(e.map(update, values, timeout=len(values))) assert sum([cur.fetchone()[0] for cur in cursors]) == sum(values) diff --git a/tests/test_pipeline_async.py b/tests/test_pipeline_async.py index ee0efccd9..b9baa589f 100644 --- a/tests/test_pipeline_async.py +++ b/tests/test_pipeline_async.py @@ -598,7 +598,7 @@ async def test_concurrency(aconn): from concurrent.futures import ThreadPoolExecutor with ThreadPoolExecutor() as e: - cursors = e.map(update, values, timeout=len(values)) + cursors = list(e.map(update, values, timeout=len(values))) assert sum([(await cur.fetchone())[0] for cur in cursors]) == sum(values)