From 2b4b46efec78ca1ed48432275f5b65b72298b941 Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Fri, 5 Nov 2021 13:05:20 +0100 Subject: [PATCH] Add type variable to *Cursor in connection tests --- tests/test_connection.py | 4 ++-- tests/test_connection_async.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_connection.py b/tests/test_connection.py index 42c5c849a..09cf1df92 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -504,7 +504,7 @@ def test_fileno(conn): def test_cursor_factory(conn): assert conn.cursor_factory is psycopg.Cursor - class MyCursor(psycopg.Cursor): + class MyCursor(psycopg.Cursor[psycopg.rows.Row]): pass conn.cursor_factory = MyCursor @@ -518,7 +518,7 @@ def test_cursor_factory(conn): def test_server_cursor_factory(conn): assert conn.server_cursor_factory is psycopg.ServerCursor - class MyServerCursor(psycopg.ServerCursor): + class MyServerCursor(psycopg.ServerCursor[psycopg.rows.Row]): pass conn.server_cursor_factory = MyServerCursor diff --git a/tests/test_connection_async.py b/tests/test_connection_async.py index 650e5f4ea..fe608f205 100644 --- a/tests/test_connection_async.py +++ b/tests/test_connection_async.py @@ -513,7 +513,7 @@ async def test_fileno(aconn): async def test_cursor_factory(aconn): assert aconn.cursor_factory is psycopg.AsyncCursor - class MyCursor(psycopg.AsyncCursor): + class MyCursor(psycopg.AsyncCursor[psycopg.rows.Row]): pass aconn.cursor_factory = MyCursor @@ -527,7 +527,7 @@ async def test_cursor_factory(aconn): async def test_server_cursor_factory(aconn): assert aconn.server_cursor_factory is psycopg.AsyncServerCursor - class MyServerCursor(psycopg.AsyncServerCursor): + class MyServerCursor(psycopg.AsyncServerCursor[psycopg.rows.Row]): pass aconn.server_cursor_factory = MyServerCursor -- 2.47.2