Exemplo n.º 1
0
 def test_ping_same_device_with_samed_provider_instance(self):
     communicator = MockCommunicator({'device': 'IMU'})
     provider1 = DeviceManager.ping(communicator,
                                    communicator.device_access, None)
     provider2 = DeviceManager.ping(communicator,
                                    communicator.device_access, None)
     communicator.close()
     self.assertEqual(provider1, provider2)
Exemplo n.º 2
0
def build_provider(device_access_type='IMU', filter_device_type=None):
    mocker_communicator_options = {'device': device_access_type}
    communicator = MockCommunicator(mocker_communicator_options)
    provider = DeviceManager.ping(communicator, communicator.device_access,
                                  filter_device_type)
    communicator.close()
    return provider
Exemplo n.º 3
0
def build_provider(device_access_type='IMU', filter_device_type=None):
    mocker_communicator_options = {'device': device_access_type}
    communicator = MockCommunicator(mocker_communicator_options)
    provider = DeviceManager.ping(communicator, communicator.device_access,
                                  filter_device_type)
    provider.setup(None)  # no options
    time.sleep(0.5)
    return provider