# 17.19. test_process_pool¶

Test the behaviour of the ProcessPool class.

## 17.19.1. Module Contents¶

### 17.19.1.1. Functions¶

 dummy_initializer(*args: Iterable) → Tuple Implement a ‘do nothing’ function that accepts initialization arguments. square(num: int) → int Return the square of an integer. summation(*args: Iterable[int]) → int Return the sum of all integer arguments. test_init(attributes: dict) → None Test that a process pool can be initialized with each of its arguments. test_close(mocker: MockerFixture) → None Test that the composed pool is closed as well. test_with_context(mocker: MockerFixture) → None Test that the composed pool’s context is managed as well. test_apply() → None Test that a function can be applied. test_apply_async() → None Test that a function can be applied asynchronously. test_map() → None Test that a function can be mapped over an iterable of values. test_map_async() → None Test that a function can be mapped over an iterable of values asynchronously. test_imap() → None Test that mapped function results can be iterated. test_imap_unordered() → None Test that mapped function results can be iterated in any order. test_starmap() → None Test that a function can be starmapped over many iterables. test_starmap_async() → None 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.square(num: int) → int[source]

Return the square of an integer.

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() → None[source]

Test that a function can be applied.

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() → None[source]

Test that mapped function results can be iterated.

test_process_pool.test_imap_unordered() → None[source]

Test that mapped function results can be iterated in any order.

test_process_pool.test_starmap() → None[source]

Test that a function can be starmapped over many iterables.

test_process_pool.test_starmap_async() → None[source]

Test that a function can be starmapped over many iterables asynchronously.