From: Denis Laxalde Date: Fri, 5 Nov 2021 12:05:20 +0000 (+0100) Subject: Add type variable to *Cursor in connection tests X-Git-Tag: 3.0.3~3^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b4b46efec78ca1ed48432275f5b65b72298b941;p=thirdparty%2Fpsycopg.git Add type variable to *Cursor in connection tests --- 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