Orchestrata Ultimate › Tests › Reference › scripts › test_irc_watchdog

Tests reference — tests/scripts/test_irc_watchdog.py

Module of tests/scripts, split out because the directory page would be too large.

Prose pending.

tests/scripts/test_irc_watchdog.py

source · 7 tests · 258 lines

Coverage tests for scripts/_irc_watchdog.py.

Kind Name Line Description
function test_is_listener_alive_detects_running_process 35 A real process with _irc_listen.py in its cmdline is detected.
function test_is_listener_alive_returns_false_on_pgrep_failure 52 When pgrep is not on PATH, subprocess.run raises FileNotFoundError
function test_is_listener_alive_returns_false_when_no_match 77 When pgrep finds no matching process, returns False.
function test_start_listener_returns_popen 110 start_listener spawns a real subprocess that runs to completion.
function test_main_starts_listener_when_not_running 154 main() starts the listener when is_listener_alive returns False.
function test_main_reports_already_running 186 main() reports 'listener already running' when a matching process exists.
function test_main_loop_restarts_dead_listener 228 main() restarts listener in loop when it dies between checks.