]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
skip sqlite tests when it's not available
authorPhilip Jenvey <pjenvey@underboss.org>
Sun, 19 Jul 2009 06:36:20 +0000 (06:36 +0000)
committerPhilip Jenvey <pjenvey@underboss.org>
Sun, 19 Jul 2009 06:36:20 +0000 (06:36 +0000)
test/engine/test_ddlevents.py
test/orm/sharding/test_shard.py

index 5343fb2c9f919cee2af537328a2f72ed41cbf6bb..434a5d873c7c0c6b0a85675c4ea96417f433cfcb 100644 (file)
@@ -7,6 +7,7 @@ from sqlalchemy.test.schema import Column
 import sqlalchemy as tsa
 from sqlalchemy.test import TestBase, testing, engines
 from sqlalchemy.test.testing import AssertsCompiledSQL
+from nose import SkipTest
 
 class DDLEventTest(TestBase):
     class Canary(object):
@@ -281,7 +282,10 @@ class DDLExecutionTest(TestBase):
         assert 'fnord' in strings
 
     def test_ddl_execute(self):
-        engine = create_engine('sqlite:///')
+        try:
+            engine = create_engine('sqlite:///')
+        except ImportError:
+            raise SkipTest('Requires sqlite')
         cx = engine.connect()
         table = self.users
         ddl = DDL('SELECT 1')
index 89e23fb759139bff3a55c8aa9aa6b665eac5608c..e8ffaa7cad599b2a3d5a6d53981a10f8d7e0f8f9 100644 (file)
@@ -6,6 +6,7 @@ from sqlalchemy.orm.shard import ShardedSession
 from sqlalchemy.sql import operators
 from sqlalchemy.test import *
 from sqlalchemy.test.testing import eq_
+from nose import SkipTest
 
 # TODO: ShardTest can be turned into a base for further subclasses
 
@@ -14,7 +15,10 @@ class ShardTest(TestBase):
     def setup_class(cls):
         global db1, db2, db3, db4, weather_locations, weather_reports
 
-        db1 = create_engine('sqlite:///shard1.db')
+        try:
+            db1 = create_engine('sqlite:///shard1.db')
+        except ImportError:
+            raise SkipTest('Requires sqlite')
         db2 = create_engine('sqlite:///shard2.db')
         db3 = create_engine('sqlite:///shard3.db')
         db4 = create_engine('sqlite:///shard4.db')