From 486249d74f63cee80034452ace65bb57f77fd875 Mon Sep 17 00:00:00 2001 From: goodboy Date: Thu, 30 Apr 2026 14:17:41 -0400 Subject: [PATCH] Allow per-call `start_method`/`loglevel` overrides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In `tests/devx/conftest.py::spawn`, refactor the fixture-internal closures so consumer tests can pass explicit `start_method`/`loglevel` to each `_spawn()` invocation rather than only inheriting the fixture- scoped parametrize values. Deats, - promote `set_spawn_method()` and `set_loglevel()` to take their respective values as fn params (vs closing over the fixture-scope vars). - give `_spawn()` `start_method=start_method` and `loglevel: str|None = None` kwargs so callers override one-off without re-parametrizing the suite. NOTE: this drops the implicit fixture- scoped `loglevel` forward — `_spawn()` callers now must pass `loglevel=...` explicitly. - TODO: figure out how `--ll ` should map to the default (currently `None` → uses env-var or tractor default). - add a docstring to `_spawn()` so its role as the consumer-facing closure is obvious from `help()`. Also, - `assert_before()` now returns the `.before` output on success (was `None`); add a one-line docstring describing the new return contract. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tests/devx/conftest.py | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/tests/devx/conftest.py b/tests/devx/conftest.py index 3414d113..12e3ce04 100644 --- a/tests/devx/conftest.py +++ b/tests/devx/conftest.py @@ -96,7 +96,9 @@ def spawn( # disable all ANSI color output # os.environ['NO_COLOR'] = '1' - def set_spawn_method(): + def set_spawn_method( + start_method: str, + ): ''' Drive the actor-spawn backend inside the spawned `examples/debugging/