Skip to content

Commit 63a91ba

Browse files
committed
Document init_worker_code handling with custom test_worker function
1 parent ded18ad commit 63a91ba

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

docs/src/advanced.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ The `test_worker` function receives the test name and should return either:
166166
- A worker object (from [`addworker`](@ref)) for tests that need special configuration
167167
- `nothing` to use the default worker pool
168168

169+
!!! note
170+
If your test suite uses both a `test_worker` function and `init_worker_code` as described in a prior section,
171+
`test_worker` must also take in `init_worker_code` as a second argument. You are responsible for passing it to
172+
[`addworker`](@ref) if your `init_code` depends on any `init_worker_code` definitions.
173+
169174
## Custom Arguments
170175

171176
If your package needs to accept its own command-line arguments in addition to `ParallelTestRunner`'s options, use [`parse_args`](@ref) with custom flags:

0 commit comments

Comments
 (0)