Fix pubsub test when run boxed

This commit is contained in:
Scott Talbert
2016-09-08 20:25:10 -04:00
parent 78ae39a664
commit 76444003fe
2 changed files with 4 additions and 0 deletions

View File

@@ -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():

View File

@@ -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()