From 1f1dcbe1c19b349a9531dec0572501fd16c3d3d0 Mon Sep 17 00:00:00 2001 From: goodboy Date: Thu, 2 Jul 2026 23:35:07 -0400 Subject: [PATCH] Port `test_runtime` off `run_in_actor` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sole call-site: an inlined `run_in_actor(...).result()` -> blocking `tractor.to_actor.run(fn, an=an, ...)` (#477 removal). Behaviour identical — the one-shot's result/error is awaited in the caller's task rather than reaped at nursery teardown; the enclosing `move_on_after` still cancels the sub in the `error_in_child=False` case. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tests/test_runtime.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/test_runtime.py b/tests/test_runtime.py index 782af81e..6ea970b3 100644 --- a/tests/test_runtime.py +++ b/tests/test_runtime.py @@ -78,13 +78,12 @@ async def test_lifetime_stack_wipes_tmpfile( async with tractor.open_nursery( loglevel=loglevel, ) as an: - await ( # inlined `tractor.Portal` - await an.run_in_actor( - crash_and_clean_tmpdir, - tmp_file_path=path, - error=error_in_child, - ) - ).result() + await tractor.to_actor.run( + crash_and_clean_tmpdir, + an=an, + tmp_file_path=path, + error=error_in_child, + ) except ( tractor.RemoteActorError, BaseExceptionGroup,