]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Work around py-postgresql handling of exceptions.
authorMichael Trier <mtrier@gmail.com>
Tue, 23 Feb 2010 04:39:48 +0000 (04:39 +0000)
committerMichael Trier <mtrier@gmail.com>
Tue, 23 Feb 2010 04:39:48 +0000 (04:39 +0000)
test/dialect/test_postgresql.py

index 9361f4dbcf8cc3ae5d7dc04165e80b3b8a44da1e..073be5cb976b449403812822fe82eeb0695deda0 100644 (file)
@@ -224,7 +224,7 @@ class FloatCoercionTest(TablesTest, AssertsExecutionResults):
                     func.stddev_pop(data_table.c.data, type_=type_)
                 ])
             ).scalar()
-            
+
             eq_(self._round(ret), result)
 
             ret = testing.db.execute(
@@ -853,6 +853,8 @@ class InsertTest(TestBase, AssertsExecutionResults):
         
         if self.engine.driver == 'pg8000':
             exception_cls = exc.ProgrammingError
+        elif self.engine.driver == 'pypostgresql':
+            exception_cls = Exception
         else:
             exception_cls = exc.IntegrityError