コード例 #1
0
    def test_async_apply_with_iter(self, adapter_pool: AdapterPool):
        TestSimplePool._initial()
        adapter_pool.initial()
        adapter_pool.async_apply_with_iter(functions_iter=target_funcs_iter())
        TestSimplePool._chk_record()

        _results = adapter_pool.get_result()
        TestSimplePool.chk_results(results=_results, expected_size=Task_Size)
コード例 #2
0
    def test_async_apply_by_pykeyword_with(self, adapter_pool: AdapterPool):
        TestSimplePool._initial()
        with adapter_pool as _pool:
            _pool.async_apply(tasks_size=Task_Size, function=target_function)
        TestSimplePool._chk_record()

        _results = adapter_pool.get_result()
        TestSimplePool.chk_results(results=_results, expected_size=Task_Size)
コード例 #3
0
    def test_apply(self, adapter_pool: AdapterPool):
        TestSimplePool._initial()
        adapter_pool.initial()
        adapter_pool.apply(tasks_size=Task_Size, function=target_function)
        TestSimplePool._chk_blocking_record()

        _results = adapter_pool.get_result()
        TestSimplePool.chk_results(results=_results, expected_size=Task_Size)
コード例 #4
0
    def test_apply_with_iter_by_pykeyword_with(self,
                                               adapter_pool: AdapterPool):
        TestSimplePool._initial()
        with adapter_pool as _pool:
            _pool.apply_with_iter(functions_iter=target_funcs_iter())
        TestSimplePool._chk_blocking_record()

        _results = adapter_pool.get_result()
        TestSimplePool.chk_results(results=_results, expected_size=Task_Size)
コード例 #5
0
    def test_imap_unordered_by_pykeyword_with(self, adapter_pool: AdapterPool):
        TestSimplePool._initial()
        with adapter_pool as _pool:
            _pool.imap_unordered(function=target_function_for_map,
                                 args_iter=Test_Function_Args)
        TestSimplePool._chk_map_record()

        _results = adapter_pool.get_result()
        TestSimplePool.chk_results(results=_results,
                                   expected_size=len(Test_Function_Args))
コード例 #6
0
    def test_imap(self, adapter_pool: AdapterPool):
        TestSimplePool._initial()
        adapter_pool.initial()
        adapter_pool.imap(function=target_function_for_map,
                          args_iter=Test_Function_Args)
        TestSimplePool._chk_map_record()

        _results = adapter_pool.get_result()
        TestSimplePool.chk_results(results=_results,
                                   expected_size=len(Test_Function_Args))