summaryrefslogtreecommitdiff
path: root/test/dialect/postgres.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-08-18 21:43:53 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-08-18 21:43:53 +0000
commit8f9b4bc42791a580d687df229f56bec9696478be (patch)
treef5e37a4e9a4661c5ebf34f234e0cd46b163749ee /test/dialect/postgres.py
parent7c6c1b99c2de00829b6f34ffba7e3bb689d34198 (diff)
downloadsqlalchemy-8f9b4bc42791a580d687df229f56bec9696478be.tar.gz
adding an "already exists" catch for CREATE DOMAIN
Diffstat (limited to 'test/dialect/postgres.py')
-rw-r--r--test/dialect/postgres.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/dialect/postgres.py b/test/dialect/postgres.py
index f80ddcadd..221f7660a 100644
--- a/test/dialect/postgres.py
+++ b/test/dialect/postgres.py
@@ -11,8 +11,12 @@ class DomainReflectionTest(AssertMixin):
@testing.supported('postgres')
def setUpAll(self):
con = testbase.db.connect()
- con.execute('CREATE DOMAIN testdomain INTEGER NOT NULL DEFAULT 42')
- con.execute('CREATE DOMAIN alt_schema.testdomain INTEGER DEFAULT 0')
+ try:
+ con.execute('CREATE DOMAIN testdomain INTEGER NOT NULL DEFAULT 42')
+ con.execute('CREATE DOMAIN alt_schema.testdomain INTEGER DEFAULT 0')
+ except exceptions.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)')