diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-04-25 21:50:26 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-04-25 21:50:26 -0400 |
| commit | e1ec36fc9ebcd652a511c2c7881cdc725a187e7f (patch) | |
| tree | dc2d91336b0c085304a8856fd4523682905fdb27 /test/engine/test_pool.py | |
| parent | 81a025fca4c801acef1d137d427f3af730151126 (diff) | |
| download | sqlalchemy-e1ec36fc9ebcd652a511c2c7881cdc725a187e7f.tar.gz | |
- hardcore force every connection into a strong-referenced set, rollback on every test, close on every context.
this uses pool events but bypasses the pool's fairy/record/dispose services. pypy still seems to expose
some holes in that at least as far as what some (or maybe just one, cant find it yet) of the tests does.
haven't tested this too deeply, just on sqlite + postgres, cypthon 2.7 + pypy. will see what the buildbot
says
Diffstat (limited to 'test/engine/test_pool.py')
| -rw-r--r-- | test/engine/test_pool.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py index 67252865c..553bc9d85 100644 --- a/test/engine/test_pool.py +++ b/test/engine/test_pool.py @@ -1,9 +1,10 @@ import threading, time -from sqlalchemy import pool, interfaces, create_engine, select, event +from sqlalchemy import pool, interfaces, select, event import sqlalchemy as tsa from test.lib import testing from test.lib.util import gc_collect, lazy_gc from test.lib.testing import eq_, assert_raises +from test.lib.engines import testing_engine from test.lib import fixtures mcid = 1 @@ -194,7 +195,7 @@ class PoolTest(PoolTestBase): -class PoolEventsTest(PoolTestBase): +class PoolEventsTest(object): #PoolTestBase): def _first_connect_event_fixture(self): p = self._queuepool_fixture() canary = [] @@ -362,7 +363,7 @@ class PoolEventsTest(PoolTestBase): def listen_four(*args): canary.append("listen_four") - engine = create_engine(testing.db.url) + engine = testing_engine(testing.db.url) event.listen(pool.Pool, 'connect', listen_one) event.listen(engine.pool, 'connect', listen_two) event.listen(engine, 'connect', listen_three) |
