From: Daniele Varrazzo Date: Sun, 19 Nov 2023 12:36:16 +0000 (+0100) Subject: test: allow importing the tests module on master with Psycopg 3.1 X-Git-Tag: 3.2.0~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b68e36426f2f6e061292eec8df6201e8a550e194;p=thirdparty%2Fpsycopg.git test: allow importing the tests module on master with Psycopg 3.1 Useful to test the master version of the pool with a released version of psycopg. --- diff --git a/tests/_test_connection.py b/tests/_test_connection.py index d82822934..fefa86a25 100644 --- a/tests/_test_connection.py +++ b/tests/_test_connection.py @@ -8,9 +8,12 @@ from dataclasses import dataclass import pytest import psycopg from psycopg.conninfo import conninfo_to_dict -from psycopg._connection_base import BaseConnection -DEFAULT_TIMEOUT = BaseConnection._DEFAULT_CONNECT_TIMEOUT +# Don't import this to allow tests to import (not necessarily to pass all) +# if the psycopg module imported is not the one expected (e.g. running +# psycopg pool tests on the master branch with psycopg 3.1.x imported). +# psycopg._connection_base.BaseConnection._DEFAULT_CONNECT_TIMEOUT +DEFAULT_TIMEOUT = 130 @pytest.fixture