From 466d34028a9f85b7b9b250e82b2ee90d098c58b8 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 20 Feb 2021 04:36:13 +0100 Subject: [PATCH] Add test for pool kwargs --- tests/test_pool.py | 6 ++++++ 1 file changed, 6 insertions(+) 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: -- 2.47.2