From 74d60c79368c1a2e70595ab33aa469e2746009c8 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Mon, 26 Oct 2009 15:10:34 +0000 Subject: improve assertion message git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@829822 13f79535-47bb-0310-9956-ffa450edef68 --- python/qpid/tests/messaging.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/qpid/tests/messaging.py b/python/qpid/tests/messaging.py index 860c3660d1..13638638fb 100644 --- a/python/qpid/tests/messaging.py +++ b/python/qpid/tests/messaging.py @@ -21,6 +21,7 @@ # boundary-conditions, config import time +from qpid import compat from qpid.tests import Test from qpid.harness import Skipped from qpid.messaging import Connection, ConnectError, Disconnected, Empty, \ @@ -585,7 +586,7 @@ class AddressErrorTests(Base): snd.send("hello") assert False, "send succeeded" except exc, e: - assert check(e), "unexpected error: %s" % e + assert check(e), "unexpected error: %s" % compat.format_exc(e) snd.close() def fetchErrorTest(self, addr, exc, check=lambda e: True): @@ -594,7 +595,7 @@ class AddressErrorTests(Base): rcv.fetch(timeout=0) assert False, "fetch succeeded" except exc, e: - assert check(e), "unexpected error: %s" % e + assert check(e), "unexpected error: %s" % compat.format_exc(e) rcv.close() def testNoneTarget(self): -- cgit v1.2.1