From: Michael Trier Date: Tue, 23 Feb 2010 04:39:48 +0000 (+0000) Subject: Work around py-postgresql handling of exceptions. X-Git-Tag: rel_0_6beta2~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c478101673113d8679525c0d1c298fa3235e3fc;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Work around py-postgresql handling of exceptions. --- diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index 9361f4dbcf..073be5cb97 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -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