summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/engines.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing/engines.py')
-rw-r--r--lib/sqlalchemy/testing/engines.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/engines.py b/lib/sqlalchemy/testing/engines.py
index 4496b8ded..f1bf5c0c4 100644
--- a/lib/sqlalchemy/testing/engines.py
+++ b/lib/sqlalchemy/testing/engines.py
@@ -306,6 +306,7 @@ def testing_engine(
options=None,
asyncio=False,
transfer_staticpool=False,
+ share_pool=False,
_sqlite_savepoint=False,
):
if asyncio:
@@ -356,6 +357,8 @@ def testing_engine(
if config.db is not None and isinstance(config.db.pool, StaticPool):
use_reaper = False
engine.pool._transfer_from(config.db.pool)
+ elif share_pool:
+ engine.pool = config.db.pool
if scope == "global":
if asyncio: