tractor/tests/devx
Gud Boi 400ed77ab1 Allow per-call `start_method`/`loglevel` overrides
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 <level>` 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

(cherry picked from commit 486249d74f)
2026-06-09 23:07:06 -04:00
..
__init__.py Officially test proto-ed `stackscope` integration 2025-03-27 13:24:25 -04:00
conftest.py Allow per-call `start_method`/`loglevel` overrides 2026-06-09 23:07:06 -04:00
test_debugger.py Strip ANSI + accept `_create(...)` in devx tests 2026-06-09 22:54:57 -04:00
test_pause_from_non_trio.py Import-or-skip `.devx.` tests requiring `greenback` 2026-06-09 23:05:19 -04:00
test_tooling.py Import-or-skip `.devx.` tests requiring `greenback` 2026-06-09 23:05:19 -04:00