From 4f333dee05791bc17dad98d3511c2ebfb09b104a Mon Sep 17 00:00:00 2001 From: goodboy Date: Thu, 12 Mar 2026 20:05:43 -0400 Subject: [PATCH] Pass `enable_transports` in `daemon` fixture Forward the `tpt_proto` fixture val into spawned daemon subprocesses via `run_daemon(enable_transports=..)` and sync `_runtime_vars['_enable_tpts']` in the `tpt_proto` fixture so sub-actors inherit the transport setting. Deats, - add `enable_transports={enable_tpts}` to the daemon spawn-cmd template in `tests/conftest.py`. - set `_state._runtime_vars['_enable_tpts']` in the `tpt_proto` fixture in `_testing/pytest.py`. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tests/conftest.py | 2 ++ tractor/_testing/pytest.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 09ca3797..46a3ea69 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -165,10 +165,12 @@ def daemon( "import tractor; " "tractor.run_daemon([], " "registry_addrs={reg_addrs}, " + "enable_transports={enable_tpts}, " "debug_mode={debug_mode}, " "loglevel={ll})" ).format( reg_addrs=str([reg_addr]), + enable_tpts=str([tpt_proto]), ll="'{}'".format(loglevel) if loglevel else None, debug_mode=debug_mode, ) diff --git a/tractor/_testing/pytest.py b/tractor/_testing/pytest.py index 1a2f63ab..65a34da1 100644 --- a/tractor/_testing/pytest.py +++ b/tractor/_testing/pytest.py @@ -232,6 +232,9 @@ def tpt_proto( from tractor import _state if _state._def_tpt_proto != proto_key: _state._def_tpt_proto = proto_key + _state._runtime_vars['_enable_tpts'] = [ + proto_key, + ] yield proto_key