mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 12:00:13 +01:00
Fix lib_pubsub_except tests
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user