Port `test_runtime` off `run_in_actor`

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
drop_ria_nursery
Gud Boi 2026-07-02 23:35:07 -04:00
parent b9d981b063
commit 1f1dcbe1c1
1 changed files with 6 additions and 7 deletions

View File

@ -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,