# Generate a path name for our database file. import os thisdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) dbpath = os.path.join(thisdir, "sqlite_zoo_test") if os.path.exists(dbpath): os.remove(dbpath) import _sqlite3 as _sqlite from geniusql.test import zoo_fixture, test opts = {'name': dbpath, # This has to be ridiculously large because SQLite isn't # very good at high concurrency, and our isolation and # multithreading tests tend to fail, or sometimes even # crash SQLite. 'deadlock_timeout': 60} db = test.DBConfig('sqlite', opts) setUp = db.setUp tearDown = db.tearDown #------------------------------------------------------------------------------- class Phase1_ZooTests(zoo_fixture.Phase1_ZooTests): pass db.register_db_test_class(Phase1_ZooTests) #--------------------------------------------------------------------------- class Phase2_ConcurrencyTests(zoo_fixture.Phase2_ConcurrencyTests): pass db.register_db_test_class(Phase2_ConcurrencyTests) #--------------------------------------------------------------------------- class Phase2_IsolationTests(zoo_fixture.Phase2_IsolationTests): pass db.register_db_test_class(Phase2_IsolationTests) #------------------------------------------------------------------------------- class Phase2_TransactionTests(zoo_fixture.Phase2_TransactionTests): pass db.register_db_test_class(Phase2_TransactionTests) #------------------------------------------------------------------------------- # TODO: thi sisn't ported yet. #class Phase2_NumericTests(zoo_fixture.Phase2_NumericTests): #pass #db.register_db_test_class(Phase2_NumericTests) #------------------------------------------------------------------------------- class Phase2_ConnectionTests(zoo_fixture.Phase2_ConnectionTests): pass db.register_db_test_class(Phase2_ConnectionTests) #------------------------------------------------------------------------------- class Phase2_SQLInjectionTests(zoo_fixture.Phase2_SQLInjectionTests): pass db.register_db_test_class(Phase2_SQLInjectionTests)