Exemplo n.º 1
0
    def test_get_event(self, mr_async_communication: PosixThreadCommunication):
        try:
            _event = mr_async_communication.get_event()
        except ValueError as e:
            assert "Async Event Loop object cannot be empty" in str(
                e
            ), "The exception error should be 'Async Event Loop object cannot be empty'."

        _event_loop = new_event_loop()
        _event = mr_async_communication.get_event(loop=_event_loop)
        assert isinstance(
            _event, async_Event
        ) is True, "This type of instance should be 'asyncio.Event'."
Exemplo n.º 2
0
 def test_get_communication(self,
                            mr_communication: PosixThreadCommunication):
     _communication = mr_communication.get_condition()
     assert isinstance(
         _communication, Condition
     ) is True, "This type of instance should be 'threading.Condition'."
Exemplo n.º 3
0
 def test_get_event(self, mr_communication: PosixThreadCommunication):
     _event = mr_communication.get_event()
     assert isinstance(
         _event, Event
     ) is True, "This type of instance should be 'threading.Event'."
Exemplo n.º 4
0
 def test_get_communication(self,
                            mr_communication: PosixThreadCommunication):
     _communication = mr_communication.get_condition()
     assert isinstance(
         _communication, Condition
     ) is True, "This type of instance should be 'multiprocessing.synchronize.Condition'."
Exemplo n.º 5
0
 def test_get_event(self, mr_communication: PosixThreadCommunication):
     _event = mr_communication.get_event()
     assert isinstance(
         _event, Event
     ) is True, "This type of instance should be 'multiprocessing.synchronize.Event'."