From e6feb14a1cd73fcc3cb03da09d368ee91acfe79c Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Tue, 2 Nov 2021 13:39:30 +0100 Subject: [PATCH] Add required type variable to (Async)Connection in pool tests --- tests/pool/test_pool.py | 3 ++- tests/pool/test_pool_async.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/pool/test_pool.py b/tests/pool/test_pool.py index 9931fb765..416b9bde0 100644 --- a/tests/pool/test_pool.py +++ b/tests/pool/test_pool.py @@ -4,6 +4,7 @@ import weakref from time import sleep, time from threading import Thread, Event from collections import Counter +from typing import Any import pytest @@ -52,7 +53,7 @@ def test_min_size_max_size(dsn): def test_connection_class(dsn): - class MyConn(psycopg.Connection): + class MyConn(psycopg.Connection[Any]): pass with pool.ConnectionPool(dsn, connection_class=MyConn, min_size=1) as p: diff --git a/tests/pool/test_pool_async.py b/tests/pool/test_pool_async.py index e8593946f..58abfd5dd 100644 --- a/tests/pool/test_pool_async.py +++ b/tests/pool/test_pool_async.py @@ -3,6 +3,7 @@ import asyncio import logging from time import time from collections import Counter +from typing import Any import pytest @@ -48,7 +49,7 @@ async def test_min_size_max_size(dsn): async def test_connection_class(dsn): - class MyConn(psycopg.AsyncConnection): + class MyConn(psycopg.AsyncConnection[Any]): pass async with pool.AsyncConnectionPool( -- 2.47.2