From 26625d897f9becd7bccc6ece037e9ad39a6a77e9 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 11 Jan 2012 20:47:53 -0500 Subject: further fixes for column/table errors --- test/engine/test_execute.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'test/engine/test_execute.py') diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py index 361c38c2f..44e44982f 100644 --- a/test/engine/test_execute.py +++ b/test/engine/test_execute.py @@ -219,16 +219,19 @@ class ExecuteTest(fixtures.TestBase): tsa.exc.InterfaceError("select * from table", {"foo":"bar"}, orig), + tsa.exc.NoReferencedTableError("message", "tname"), + tsa.exc.NoReferencedColumnError("message", "tname", "cname") ): for loads, dumps in picklers(): repickled = loads(dumps(sa_exc)) eq_(repickled.args[0], sa_exc.args[0]) - eq_(repickled.params, {"foo":"bar"}) - eq_(repickled.statement, sa_exc.statement) - if hasattr(sa_exc, "connection_invalidated"): - eq_(repickled.connection_invalidated, - sa_exc.connection_invalidated) - eq_(repickled.orig.args[0], orig.args[0]) + if isinstance(sa_exc, tsa.exc.StatementError): + eq_(repickled.params, {"foo":"bar"}) + eq_(repickled.statement, sa_exc.statement) + if hasattr(sa_exc, "connection_invalidated"): + eq_(repickled.connection_invalidated, + sa_exc.connection_invalidated) + eq_(repickled.orig.args[0], orig.args[0]) def test_dont_wrap_mixin(self): class MyException(Exception, tsa.exc.DontWrapMixin): -- cgit v1.2.1