psycopg.git / summary / log / commit / refs
commit a4338d0653842dfe6b8fddc2d034db446dbbbae2
Author: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Date: Sat Nov 11 15:30:55 2023 +0000
chore: fix mypy >= 1.7 warning in tests
tests/test_pipeline.py | 2 +-
tests/test_pipeline_async.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py
index c88475a2..8d1fb027 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 ee0efccd..b9baa589 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)
[parent: aa4d15b8ba9a]