17.19. test_process_pool
¶
Test the behaviour of the ProcessPool class.
17.19.1. Module Contents¶
17.19.1.1. Functions¶
|
Implement a ‘do nothing’ function that accepts initialization arguments. |
|
Return the square of an integer. |
|
Return the sum of all integer arguments. |
|
Test that a process pool can be initialized with each of its arguments. |
|
Test that the composed pool is closed as well. |
|
Test that the composed pool’s context is managed as well. |
|
Test that a function can be applied. |
|
Test that a function can be applied asynchronously. |
|
Test that a function can be mapped over an iterable of values. |
|
Test that a function can be mapped over an iterable of values asynchronously. |
|
Test that mapped function results can be iterated. |
|
Test that mapped function results can be iterated in any order. |
|
Test that a function can be starmapped over many iterables. |
|
Test that a function can be starmapped over many iterables asynchronously. |
-
test_process_pool.
dummy_initializer
(*args: Iterable) → Tuple[source]¶ Implement a ‘do nothing’ function that accepts initialization arguments.
-
test_process_pool.
summation
(*args: Iterable[int]) → int[source]¶ Return the sum of all integer arguments.
-
test_process_pool.
test_init
(attributes: dict) → None[source]¶ Test that a process pool can be initialized with each of its arguments.
-
test_process_pool.
test_close
(mocker: MockerFixture) → None[source]¶ Test that the composed pool is closed as well.
-
test_process_pool.
test_with_context
(mocker: MockerFixture) → None[source]¶ Test that the composed pool’s context is managed as well.
-
test_process_pool.
test_apply_async
() → None[source]¶ Test that a function can be applied asynchronously.
-
test_process_pool.
test_map
() → None[source]¶ Test that a function can be mapped over an iterable of values.
-
test_process_pool.
test_map_async
() → None[source]¶ Test that a function can be mapped over an iterable of values asynchronously.
-
test_process_pool.
test_imap_unordered
() → None[source]¶ Test that mapped function results can be iterated in any order.