Ejemplo n.º 1
0
 def test_monitor_interest(self):
     queue = gr.msg_queue()
     top = Top(devices={'s1': SimulatedDeviceForTest()})
     self.assertFalse(top._Top__running)
     top.get_monitor().get_fft_distributor().subscribe(queue)
     yield deferLater(the_reactor, 0.1, lambda: None)
     self.assertTrue(top._Top__running)
     top.get_monitor().get_fft_distributor().unsubscribe(queue)
     yield deferLater(the_reactor, 0.1, lambda: None)
     self.assertFalse(top._Top__running)
Ejemplo n.º 2
0
 def test_monitor_interest(self):
     queue = gr.msg_queue()
     top = Top(devices={'s1': SimulatedDeviceForTest()})
     self.assertFalse(top._Top__running)
     top.get_monitor().get_fft_distributor().subscribe(queue)
     yield deferLater(the_reactor, 0.1, lambda: None)
     self.assertTrue(top._Top__running)
     top.get_monitor().get_fft_distributor().unsubscribe(queue)
     yield deferLater(the_reactor, 0.1, lambda: None)
     self.assertFalse(top._Top__running)
Ejemplo n.º 3
0
 def test_monitor_interest(self):
     top = Top(devices={'s1': SimulatedDeviceForTest()})
     self.assertFalse(top._Top__running)
     _, subscription = top.get_monitor().state()['fft'].subscribe2(lambda v: None, the_subscription_context)
     try:
         yield deferLater(the_reactor, 0.1, lambda: None)
         self.assertTrue(top._Top__running)
     finally:
         subscription.unsubscribe()
     yield deferLater(the_reactor, 0.1, lambda: None)
     self.assertFalse(top._Top__running)
Ejemplo n.º 4
0
 def test_monitor_interest(self):
     top = Top(devices={'s1': SimulatedDeviceForTest()})
     self.assertFalse(top._Top__running)
     _, subscription = top.get_monitor().state()['fft'].subscribe2(lambda v: None, the_subscription_context)
     try:
         yield deferLater(the_reactor, 0.1, lambda: None)
         self.assertTrue(top._Top__running)
     finally:
         subscription.unsubscribe()
     yield deferLater(the_reactor, 0.1, lambda: None)
     self.assertFalse(top._Top__running)