mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30: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):
|
def testTopicUnspecifiedError(self):
|
||||||
#pub.TopicDefnError, pub.setTopicUnspecifiedFatal
|
#pub.TopicDefnError, pub.setTopicUnspecifiedFatal
|
||||||
|
self.pub.getDefaultTopicMgr().getOrCreateTopic('a.b')
|
||||||
self.assertRaises(self.pub.TopicDefnError, self.pub.setTopicUnspecifiedFatal)
|
self.assertRaises(self.pub.TopicDefnError, self.pub.setTopicUnspecifiedFatal)
|
||||||
self.pub.setTopicUnspecifiedFatal(checkExisting=False)
|
self.pub.setTopicUnspecifiedFatal(checkExisting=False)
|
||||||
def fn():
|
def fn():
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ class lib_pubsub_Except(wtc.PubsubTestCase):
|
|||||||
assert msg.endswith("name 'RuntimeError2' is not defined\n")
|
assert msg.endswith("name 'RuntimeError2' is not defined\n")
|
||||||
|
|
||||||
from wx.lib.pubsub.utils.exchandling import ExcPublisher
|
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)
|
topic = self.pub.getDefaultTopicMgr().getTopic(ExcPublisher.topicUncaughtExc)
|
||||||
assert not topic.hasListeners()
|
assert not topic.hasListeners()
|
||||||
handler = UncaughtExcListener()
|
handler = UncaughtExcListener()
|
||||||
|
|||||||
Reference in New Issue
Block a user