def thread(self, *, executor, loop, thread_loop): return ServiceThread(executor=executor, loop=loop, thread_loop=thread_loop)
def test_constructor_executor_deprecated(self): with pytest.raises(NotImplementedError): ServiceThread(executor=Mock())
def test_constructor_worker_argument(self): Worker = Mock() assert ServiceThread(Worker=Worker).Worker is Worker assert ServiceThread(Worker=None).Worker
def thread(self, *, Worker, loop, thread_loop): return ServiceThread(Worker=Worker, loop=loop, thread_loop=thread_loop)