diff options
author | Federico Caselli <cfederico87@gmail.com> | 2021-02-06 15:17:20 +0100 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-24 11:45:39 -0400 |
commit | 502be87a0b5c7bfa28db62b4af867457cd29a5fa (patch) | |
tree | cd54dda88546e34cca1a019fd40e89d91ee703ca /test/engine/test_pool.py | |
parent | 021f2ab7f5e03be3b6a5ad7f2c0e22bd93b83b18 (diff) | |
download | sqlalchemy-502be87a0b5c7bfa28db62b4af867457cd29a5fa.tar.gz |
Add support for aiosqlite
Added support for the aiosqlite database driver for use with the
SQLAlchemy asyncio extension.
Fixes: #5920
Change-Id: Id11a320516a44e886a6f518d2866a0f992413e55
Diffstat (limited to 'test/engine/test_pool.py')
-rw-r--r-- | test/engine/test_pool.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py index 3c2257331..1c3880504 100644 --- a/test/engine/test_pool.py +++ b/test/engine/test_pool.py @@ -329,7 +329,7 @@ class PoolDialectTest(PoolTestBase): self._do_test(pool.NullPool, ["R", "CL", "R", "CL"]) def test_static_pool(self): - self._do_test(pool.StaticPool, ["R", "R"]) + self._do_test(pool.StaticPool, ["R", "CL", "R"]) class PoolEventsTest(PoolTestBase): @@ -1960,6 +1960,21 @@ class StaticPoolTest(PoolTestBase): p2 = p.recreate() assert p._creator is p2._creator + def test_connect(self): + dbapi = MockDBAPI() + + def creator(): + return dbapi.connect("foo.db") + + p = pool.StaticPool(creator) + + c1 = p.connect() + conn = c1.connection + c1.close() + + c2 = p.connect() + is_(conn, c2.connection) + class CreatorCompatibilityTest(PoolTestBase): def test_creator_callable_outside_noarg(self): |