testing._run_test
(internal) Run a single test with error handling and optional runner middleware. Every test races against a deadline (default 5 minutes; override with the BAML_TEST_TIMEOUT_MS env var): a hung test — a stalled network read, a deadlocked await — becomes a FAIL with a "timed out" message instead of hanging the whole run. `baml.future.race` cancels the losers when one side settles (BEP-034), so a timed-out body is actively cancelled and a finished test's leftover timer doesn't linger.
Signature
(internal) Run a single test with error handling and optional runner middleware.
Every test races against a deadline (default 5 minutes; override with the
BAML_TEST_TIMEOUT_MS env var): a hung test — a stalled network read, a
deadlocked await — becomes a FAIL with a "timed out" message instead of
hanging the whole run. baml.future.race cancels the losers when one
side settles (BEP-034), so a timed-out body is actively cancelled and a
finished test's leftover timer doesn't linger.
Source:<builtin>/testing/registry.bamlbytes 20565–24491