Beispiel #1
0
 def thread(self, *, executor, loop, thread_loop):
     return ServiceThread(executor=executor,
                          loop=loop,
                          thread_loop=thread_loop)
Beispiel #2
0
 def test_constructor_executor_deprecated(self):
     with pytest.raises(NotImplementedError):
         ServiceThread(executor=Mock())
Beispiel #3
0
 def test_constructor_worker_argument(self):
     Worker = Mock()
     assert ServiceThread(Worker=Worker).Worker is Worker
     assert ServiceThread(Worker=None).Worker
Beispiel #4
0
 def thread(self, *, Worker, loop, thread_loop):
     return ServiceThread(Worker=Worker, loop=loop, thread_loop=thread_loop)