diff options
author | Jason Kirtland <jek@discorporate.us> | 2008-11-04 18:29:33 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2008-11-04 18:29:33 +0000 |
commit | 89b86f41bbdb15d024bc716fdb484b1b6f57ddb9 (patch) | |
tree | ff99caad23f789bf4ac223f8a8dd6e14b96d7ff5 /test/dialect/postgres.py | |
parent | c38e5d043f3d340f8e3cb3c82d2013739f35fc78 (diff) | |
download | sqlalchemy-89b86f41bbdb15d024bc716fdb484b1b6f57ddb9.tar.gz |
Tiny fix to test setup logic.
Diffstat (limited to 'test/dialect/postgres.py')
-rw-r--r-- | test/dialect/postgres.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/dialect/postgres.py b/test/dialect/postgres.py index 10fbf51f2..caafb39f6 100644 --- a/test/dialect/postgres.py +++ b/test/dialect/postgres.py @@ -384,12 +384,13 @@ class DomainReflectionTest(TestBase, AssertsExecutionResults): def setUpAll(self): con = testing.db.connect() - try: - con.execute('CREATE DOMAIN testdomain INTEGER NOT NULL DEFAULT 42') - con.execute('CREATE DOMAIN alt_schema.testdomain INTEGER DEFAULT 0') - except exc.SQLError, e: - if not "already exists" in str(e): - raise e + for ddl in ('CREATE DOMAIN testdomain INTEGER NOT NULL DEFAULT 42', + 'CREATE DOMAIN alt_schema.testdomain INTEGER DEFAULT 0'): + try: + con.execute(ddl) + except exc.SQLError, e: + if not "already exists" in str(e): + raise e con.execute('CREATE TABLE testtable (question integer, answer testdomain)') con.execute('CREATE TABLE alt_schema.testtable(question integer, answer alt_schema.testdomain, anything integer)') con.execute('CREATE TABLE crosschema (question integer, answer alt_schema.testdomain)') |