def testMonitorIteration(self): bridge = tcTests._Bridge() tcTests._checkDependencies() mon = Monitor() mon.start() iterator = iter(mon) bridge.addDevice() # Generate an event to avoid blocking iterator.next() bridge.delDevice() iterator.next() # Generate an event to avoid blocking # Stop the monitor and check that eventually StopIteration is raised. # There might be other system link events so we loop to exhaust them. mon.stop() with self.assertRaises(StopIteration): while True: iterator.next()
def setUp(self): tcTests._checkDependencies() self._bridge.addDevice()
def setUp(self): tcTests._checkDependencies() self._bridge.addDevice() self._unicode_bridge.devName = 'test-トトロ' self._unicode_bridge.addDevice()
def setUp(self): _checkDependencies() self._bridge.addDevice()