mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-15 17:20:07 +01:00
Fix pubsub test when run boxed
This commit is contained in:
@@ -234,6 +234,7 @@ class lib_pubsub_Except(wtc.PubsubTestCase):
|
||||
|
||||
def testTopicUnspecifiedError(self):
|
||||
#pub.TopicDefnError, pub.setTopicUnspecifiedFatal
|
||||
self.pub.getDefaultTopicMgr().getOrCreateTopic('a.b')
|
||||
self.assertRaises(self.pub.TopicDefnError, self.pub.setTopicUnspecifiedFatal)
|
||||
self.pub.setTopicUnspecifiedFatal(checkExisting=False)
|
||||
def fn():
|
||||
|
||||
@@ -69,6 +69,9 @@ class lib_pubsub_Except(wtc.PubsubTestCase):
|
||||
assert msg.endswith("name 'RuntimeError2' is not defined\n")
|
||||
|
||||
from wx.lib.pubsub.utils.exchandling import ExcPublisher
|
||||
if not self.pub.getDefaultTopicMgr().hasTopicDefinition(ExcPublisher.topicUncaughtExc):
|
||||
excPublisher = ExcPublisher(self.pub.getDefaultTopicMgr() )
|
||||
self.pub.setListenerExcHandler(excPublisher)
|
||||
topic = self.pub.getDefaultTopicMgr().getTopic(ExcPublisher.topicUncaughtExc)
|
||||
assert not topic.hasListeners()
|
||||
handler = UncaughtExcListener()
|
||||
|
||||
Reference in New Issue
Block a user