diff options
author | Jason Kirtland <jek@discorporate.us> | 2008-01-12 22:03:42 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2008-01-12 22:03:42 +0000 |
commit | 17d3c8764e020379e54053bca0b0a2bc71d48aa0 (patch) | |
tree | 0b46f1ddc57292b8f5bfbc28ab1679230f63e426 /test/engine/execute.py | |
parent | c194962019d1bc7322e20b82c33aa1bab3bc2a28 (diff) | |
download | sqlalchemy-17d3c8764e020379e54053bca0b0a2bc71d48aa0.tar.gz |
- testbase is gone, replaced by testenv
- Importing testenv has no side effects- explicit functions provide similar behavior to the old immediate behavior of testbase
- testing.db has the configured db
- Fixed up the perf/* scripts
Diffstat (limited to 'test/engine/execute.py')
-rw-r--r-- | test/engine/execute.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/engine/execute.py b/test/engine/execute.py index 950efe764..220239fbe 100644 --- a/test/engine/execute.py +++ b/test/engine/execute.py @@ -1,4 +1,4 @@ -import testbase +import testenv; testenv.configure_for_tests() from sqlalchemy import * from sqlalchemy import exceptions from testlib import * @@ -6,7 +6,7 @@ from testlib import * class ExecuteTest(PersistTest): def setUpAll(self): global users, metadata - metadata = MetaData(testbase.db) + metadata = MetaData(testing.db) users = Table('users', metadata, Column('user_id', INT, primary_key = True), Column('user_name', VARCHAR(20)), @@ -14,13 +14,13 @@ class ExecuteTest(PersistTest): metadata.create_all() def tearDown(self): - testbase.db.connect().execute(users.delete()) + testing.db.connect().execute(users.delete()) def tearDownAll(self): metadata.drop_all() @testing.fails_on_everything_except('firebird', 'maxdb', 'sqlite') def test_raw_qmark(self): - for conn in (testbase.db, testbase.db.connect()): + for conn in (testing.db, testing.db.connect()): conn.execute("insert into users (user_id, user_name) values (?, ?)", (1,"jack")) conn.execute("insert into users (user_id, user_name) values (?, ?)", [2,"fred"]) conn.execute("insert into users (user_id, user_name) values (?, ?)", [3,"ed"], [4,"horse"]) @@ -33,7 +33,7 @@ class ExecuteTest(PersistTest): @testing.fails_on_everything_except('mysql', 'postgres') # some psycopg2 versions bomb this. def test_raw_sprintf(self): - for conn in (testbase.db, testbase.db.connect()): + for conn in (testing.db, testing.db.connect()): conn.execute("insert into users (user_id, user_name) values (%s, %s)", [1,"jack"]) conn.execute("insert into users (user_id, user_name) values (%s, %s)", [2,"ed"], [3,"horse"]) conn.execute("insert into users (user_id, user_name) values (%s, %s)", 4, 'sally') @@ -47,7 +47,7 @@ class ExecuteTest(PersistTest): @testing.unsupported('mysql') @testing.fails_on_everything_except('postgres') def test_raw_python(self): - for conn in (testbase.db, testbase.db.connect()): + for conn in (testing.db, testing.db.connect()): conn.execute("insert into users (user_id, user_name) values (%(id)s, %(name)s)", {'id':1, 'name':'jack'}) conn.execute("insert into users (user_id, user_name) values (%(id)s, %(name)s)", {'id':2, 'name':'ed'}, {'id':3, 'name':'horse'}) conn.execute("insert into users (user_id, user_name) values (%(id)s, %(name)s)", id=4, name='sally') @@ -57,7 +57,7 @@ class ExecuteTest(PersistTest): @testing.fails_on_everything_except('sqlite') def test_raw_named(self): - for conn in (testbase.db, testbase.db.connect()): + for conn in (testing.db, testing.db.connect()): conn.execute("insert into users (user_id, user_name) values (:id, :name)", {'id':1, 'name':'jack'}) conn.execute("insert into users (user_id, user_name) values (:id, :name)", {'id':2, 'name':'ed'}, {'id':3, 'name':'horse'}) conn.execute("insert into users (user_id, user_name) values (:id, :name)", id=4, name='sally') @@ -66,7 +66,7 @@ class ExecuteTest(PersistTest): conn.execute("delete from users") def test_exception_wrapping(self): - for conn in (testbase.db, testbase.db.connect()): + for conn in (testing.db, testing.db.connect()): try: conn.execute("osdjafioajwoejoasfjdoifjowejfoawejqoijwef") assert False @@ -74,4 +74,4 @@ class ExecuteTest(PersistTest): assert True if __name__ == "__main__": - testbase.main() + testenv.main() |