Skip to content

boolean parsing in engine_from_config wrt engine strategies is incorrect #3435

@sqlalchemy-bot

Description

@sqlalchemy-bot

Migrated issue, originally created by Michael Bayer (@zzzeek)

diff --git a/test/engine/test_parseconnect.py b/test/engine/test_parseconnect.py
index fb1f338..dfd39d0 100644
--- a/test/engine/test_parseconnect.py
+++ b/test/engine/test_parseconnect.py
@@ -138,6 +138,16 @@ class CreateEngineTest(fixtures.TestBase):
                             'z=somevalue')
         assert e.echo is True
 
+    def test_pool_threadlocal_from_config(self):
+        dbapi = mock_dbapi
+
+        config = {
+            'sqlalchemy.url': 'postgresql://scott:tiger@somehost/test',
+            'sqlalchemy.pool_threadlocal': "false"}
+
+        e = engine_from_config(config, module=dbapi, _initialize=False)
+        eq_(e.pool._use_threadlocal, False)
+
     def test_pool_reset_on_return_from_config(self):
         dbapi = mock_dbapi

fails. We have 'bool' as the handler in default.py and there is no string processing here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingengineengines, connections, transactions, isolation levels, execution optionshigh priority

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions