def threaded_single_parameter_with_tqdm_progress_test(): tasks = [1, 2, 3] results = list( thread.threaded(func=process_single_parameter_task, params=tasks, processes=2, progress=True)) assert results == [1, 4, 9]
def threaded_single_parameter_with_no_progress_test(): tasks = [1, 2, 3] results = list( thread.threaded(func=process_single_parameter_task, params=tasks, processes=2, progress=True, progress_type='tqdm_notebook'))
def threaded_multiple_parameter_with_no_progress_test(): tasks = [(1, 2, 3), (2, 3, 4), (3, 4, 5)] results = list( thread.threaded(func=process_multiple_parameter_task, params=tasks, processes=2, progress=False)) assert results == [6, 24, 60]