]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
refactor
authorPhilip Jenvey <pjenvey@underboss.org>
Sun, 3 May 2009 00:54:06 +0000 (00:54 +0000)
committerPhilip Jenvey <pjenvey@underboss.org>
Sun, 3 May 2009 00:54:06 +0000 (00:54 +0000)
test/engine/parseconnect.py

index 327a470a591f1e0ce9c2363f31db8b4673b7215d..329f02024025edd32a3c6303fca41159485e4f18 100644 (file)
@@ -173,12 +173,8 @@ pool_timeout=10
         # these args work for QueuePool
         e = create_engine('postgres://', max_overflow=8, pool_timeout=60, poolclass=tsa.pool.QueuePool, module=MockDBAPI())
 
-        try:
-            # but not SingletonThreadPool
-            e = create_engine('sqlite://', max_overflow=8, pool_timeout=60, poolclass=tsa.pool.SingletonThreadPool)
-            assert False
-        except TypeError:
-            assert True
+        # but not SingletonThreadPool
+        self.assertRaises(TypeError, create_engine, 'sqlite://', max_overflow=8, pool_timeout=60, poolclass=tsa.pool.SingletonThreadPool)
 
 class MockDBAPI(object):
     def __init__(self, **kwargs):