def testNotifications(self): capture = StringIO() logger = notification.useNotifyByWriteFile(capture) def block(): def listener(): pass self.pub.subscribe(listener, 'testNotifications') block()
def captureStdout(): from six import StringIO capture = StringIO() useNotifyByWriteFile(fileObj=capture) return capture
def captureStdout(): from wx.lib.six import StringIO capture = StringIO() useNotifyByWriteFile( fileObj = capture ) return capture