13 lines
414 B
Python
13 lines
414 B
Python
from concurrent.futures import ThreadPoolExecutor
|
|
|
|
from app.services import task_service
|
|
|
|
|
|
def test_task_executor_is_single_worker_thread_pool():
|
|
assert isinstance(task_service.task_executor, ThreadPoolExecutor)
|
|
assert task_service.task_executor._max_workers == 1
|
|
|
|
|
|
def test_run_task_entrypoint_is_synchronous_function():
|
|
assert task_service.inspect.iscoroutinefunction(task_service.run_task) is False
|