Fix lib_pubsub_except tests

This commit is contained in:
Scott Talbert
2016-08-14 11:13:44 -04:00
parent 0a80536c8b
commit ed9ddf5300

View File

@@ -25,7 +25,7 @@ class lib_pubsub_Except(wtc.PubsubTestCase):
self.pub.setListenerExcHandler(excPublisher)
# create a listener that raises an exception:
from lib_pubsub_except_raisinglistener import getRaisingListener
from .lib_pubsub_except_raisinglistener import getRaisingListener
raisingListener = getRaisingListener()
self.pub.setNotificationFlags(all=False)
@@ -42,7 +42,7 @@ class lib_pubsub_Except(wtc.PubsubTestCase):
def testHandleExcept1b(self):
# create a listener that raises an exception:
from lib_pubsub_except_raisinglistener import getRaisingListener
from .lib_pubsub_except_raisinglistener import getRaisingListener
raisingListener = getRaisingListener()
self.pub.subscribe(raisingListener, 'testHandleExcept1b')
@@ -66,7 +66,7 @@ class lib_pubsub_Except(wtc.PubsubTestCase):
# finally the string for formatted traceback:
msg = excTraceback.getFormattedString()
assert msg.startswith(' File')
assert msg.endswith("global name 'RuntimeError2' is not defined\n")
assert msg.endswith("name 'RuntimeError2' is not defined\n")
from wx.lib.pubsub.utils.exchandling import ExcPublisher
topic = self.pub.getDefaultTopicMgr().getTopic(ExcPublisher.topicUncaughtExc)