From 1b0ac7e43b715b9050cb5f45d4a180bfc203c8a9 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 9 Jul 2006 17:58:01 +0000 Subject: added workaround for funny pragma behavior on windows pysqlite singletonthreadpool has a dispose() method, used by proxy_engine test to better clean up after itself on windows --- test/engine/proxy_engine.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test/engine/proxy_engine.py') diff --git a/test/engine/proxy_engine.py b/test/engine/proxy_engine.py index d468e946f..5b957b4dc 100644 --- a/test/engine/proxy_engine.py +++ b/test/engine/proxy_engine.py @@ -123,6 +123,7 @@ class ThreadProxyTest(ProxyTestBase): assert names == [uname] finally: module_metadata.drop_all(module_engine) + module_engine.get_engine().dispose() except Exception, e: import traceback traceback.print_exc() @@ -131,20 +132,18 @@ class ThreadProxyTest(ProxyTestBase): queue.put(False) return test - # NOTE: I'm not sure how to give the test runner the option to - # override these uris, or how to safely clear them after test runs a = Thread(target=run('sqlite:///threadtesta.db', 'jim', qa)) b = Thread(target=run('sqlite:///threadtestb.db', 'joe', qb)) a.start() b.start() - + # block and wait for the threads to push their results - res = qa.get(True) + res = qa.get() if res != False: raise res - res = qb.get(True) + res = qb.get() if res != False: raise res -- cgit v1.2.1