From: Daniele Varrazzo Date: Sat, 20 Feb 2021 03:36:13 +0000 (+0100) Subject: Add test for pool kwargs X-Git-Tag: 3.0.dev0~87^2~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=466d34028a9f85b7b9b250e82b2ee90d098c58b8;p=thirdparty%2Fpsycopg.git Add test for pool kwargs --- diff --git a/tests/test_pool.py b/tests/test_pool.py index 0a40c6afa..0463f1eef 100644 --- a/tests/test_pool.py +++ b/tests/test_pool.py @@ -30,6 +30,12 @@ def test_minconn_maxconn(dsn): pool.ConnectionPool(dsn, minconn=4, maxconn=2) +def test_kwargs(dsn): + p = pool.ConnectionPool(dsn, kwargs={"autocommit": True}, minconn=1) + with p.connection() as conn: + assert conn.autocommit + + def test_its_really_a_pool(dsn): p = pool.ConnectionPool(dsn, minconn=2) with p.connection() as conn: