MCPcopy
hub / github.com/Bogdanp/dramatiq / test_cli_worker_fork_timeout_invalid_negative

Function test_cli_worker_fork_timeout_invalid_negative

tests/test_cli.py:382–402  ·  view source on GitHub ↗
(start_cli)

Source from the content-addressed store, hash-verified

380
381@skip_on_windows
382def test_cli_worker_fork_timeout_invalid_negative(start_cli):
383 proc = start_cli(
384 "tests.test_cli:broker",
385 extra_args=[
386 "--processes",
387 "1",
388 "--threads",
389 "1",
390 "--worker-fork-timeout",
391 "-5",
392 ],
393 stdout=PIPE,
394 stderr=STDOUT,
395 )
396 proc.wait(60)
397
398 # The process return code should be 2
399 assert proc.returncode == 2
400
401 # And the output should contain an error
402 assert b"worker-fork-timeout too small (minimum recommended: 10ms)." in proc.stdout.read()
403
404
405@skip_on_windows

Callers

nothing calls this directly

Calls 3

start_cliFunction · 0.85
readMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected