From d27d4338b186a24e4cc2a5a691250301dde723d4 Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Tue, 29 Mar 2022 09:00:07 +0200 Subject: [PATCH] test: add missing returning=True to executemany() in pipeline tests Query in test_executemany() has a returning clause and we fetch results from cursor after execution, so it seems the returning option to executemany() is needed. These tests probably do not fail because of the TODO in Cursor._set_results_from_pipeline(). --- tests/test_pipeline.py | 1 + tests/test_pipeline_async.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py index 62a66acb1..c5e3a37cd 100644 --- a/tests/test_pipeline.py +++ b/tests/test_pipeline.py @@ -167,6 +167,7 @@ def test_executemany(conn): cur.executemany( "insert into execmanypipeline(num) values (%s) returning id", [(10,), (20,)], + returning=True, ) assert cur.fetchone() == (1,) assert cur.nextset() diff --git a/tests/test_pipeline_async.py b/tests/test_pipeline_async.py index c7ce2df94..ba4065821 100644 --- a/tests/test_pipeline_async.py +++ b/tests/test_pipeline_async.py @@ -170,6 +170,7 @@ async def test_executemany(aconn): await cur.executemany( "insert into execmanypipeline(num) values (%s) returning id", [(10,), (20,)], + returning=True, ) assert (await cur.fetchone()) == (1,) assert cur.nextset() -- 2.47.3