Orchestrata Ultimate › Tests › Reference › kernel › test_audit_bootstrap

Tests reference — tests/kernel/test_audit_bootstrap.py

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

Prose pending.

tests/kernel/test_audit_bootstrap.py

source · 15 tests · 205 lines

Tests for kernel.audit_bootstrap — the shared construction + fire-and-

Covers: kernel.audit_bootstrap

Kind Name Line Description
class TestAuditDisabled 41
method TestAuditDisabled.test_true_for_1 42
method TestAuditDisabled.test_true_for_true_case_insensitive 45
method TestAuditDisabled.test_false_when_unset 48
method TestAuditDisabled.test_false_for_0 51
class TestBuildDefaultAuditLogger 55
method TestBuildDefaultAuditLogger.test_none_when_disabled 56
method TestBuildDefaultAuditLogger.test_real_logger_when_enabled 59
class TestFireAndForgetAudit 66
method TestFireAndForgetAudit.test_schedules_a_task_on_the_running_loop 67 With a running loop, the coroutine actually gets to run — not
method TestFireAndForgetAudit.test_closes_the_coroutine_when_no_loop_is_running 83 Called from plain sync code (no running event loop) — the
class TestDrainAuditTasks 99
method TestDrainAuditTasks.test_scheduled_task_is_strongly_referenced_until_it_completes 100 loop.create_task returns the only strong reference to the task —
method TestDrainAuditTasks.test_drain_waits_for_the_write_instead_of_polling 125 The point of the drain: a SYNCHRONOUS caller can make an audit
method TestDrainAuditTasks.test_drain_is_zero_when_nothing_is_in_flight 140
method TestDrainAuditTasks.test_a_failing_task_does_not_raise_into_the_drain 143 Audit must never affect the hot path — including at drain time.
method TestDrainAuditTasks.test_drain_reports_rather_than_raises_on_timeout 153 A slow audit write must not turn into a caller error.
class TestLogAuditTaskResult 173
method TestLogAuditTaskResult.test_cancelled_task_is_a_no_op 174
method TestLogAuditTaskResult.test_failed_task_logs_a_warning 190