From 87811ea3afab78de7e18e252eb0d3292edc94d56 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 12 Jul 2025 07:08:45 +0200 Subject: [PATCH] test: fix results() test Test a server-side cursor for real, drop unneeded parametrization. --- tests/test_cursor_server.py | 9 ++++----- tests/test_cursor_server_async.py | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/test_cursor_server.py b/tests/test_cursor_server.py index a22571cce..cd680b29a 100644 --- a/tests/test_cursor_server.py +++ b/tests/test_cursor_server.py @@ -583,8 +583,7 @@ def test_row_maker_returns_none(conn): assert list(stream) == recs -@pytest.mark.parametrize("count", [1]) -def test_results_after_execute(conn, count): - with conn.cursor() as cur: - cur.execute(";".join(["select 1"] * count)) - assert list(cur.results()) == [cur] * count +def test_results_after_execute(conn): + with conn.cursor("test") as cur: + cur.execute("select 1") + assert list(cur.results()) == [cur] diff --git a/tests/test_cursor_server_async.py b/tests/test_cursor_server_async.py index 8bfb5ac44..5a56b2c13 100644 --- a/tests/test_cursor_server_async.py +++ b/tests/test_cursor_server_async.py @@ -589,8 +589,7 @@ async def test_row_maker_returns_none(aconn): assert await alist(stream) == recs -@pytest.mark.parametrize("count", [1]) -async def test_results_after_execute(aconn, count): - async with aconn.cursor() as cur: - await cur.execute(";".join(["select 1"] * count)) - assert await alist(cur.results()) == [cur] * count +async def test_results_after_execute(aconn): + async with aconn.cursor("test") as cur: + await cur.execute("select 1") + assert await alist(cur.results()) == [cur] -- 2.47.2