Wire `reg_addr` into `test_context_stream_semantics`

Same wire-up pattern as the prior `test_dynamic_pub_sub`
commit: each test that already pulled in `debug_mode`
now also pulls in `reg_addr` and passes
`registry_addrs=[reg_addr]` into `tractor.open_nursery()`,
so the suite's standard registry-addr conventions apply.

Tests touched:
- `test_started_misuse`
- `test_simple_context`
- `test_parent_cancels`
- `test_one_end_stream_not_opened`
- `test_maybe_allow_overruns_stream`
- `test_ctx_with_self_actor`

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
subint_forkserver_backend
Gud Boi 2026-04-27 13:52:28 -04:00
parent 9b05f659b3
commit 66f1941f46
1 changed files with 12 additions and 0 deletions

View File

@ -115,10 +115,12 @@ async def not_started_but_stream_opened(
) )
def test_started_misuse( def test_started_misuse(
target: Callable, target: Callable,
reg_addr: tuple,
debug_mode: bool, debug_mode: bool,
): ):
async def main(): async def main():
async with tractor.open_nursery( async with tractor.open_nursery(
registry_addrs=[reg_addr],
debug_mode=debug_mode, debug_mode=debug_mode,
) as an: ) as an:
portal = await an.start_actor( portal = await an.start_actor(
@ -184,6 +186,7 @@ def test_simple_context(
error_parent, error_parent,
child_blocks_forever, child_blocks_forever,
pointlessly_open_stream, pointlessly_open_stream,
reg_addr: tuple,
debug_mode: bool, debug_mode: bool,
): ):
@ -193,6 +196,7 @@ def test_simple_context(
with trio.fail_after(timeout): with trio.fail_after(timeout):
async with tractor.open_nursery( async with tractor.open_nursery(
registry_addrs=[reg_addr],
debug_mode=debug_mode, debug_mode=debug_mode,
) as an: ) as an:
portal = await an.start_actor( portal = await an.start_actor(
@ -278,6 +282,7 @@ def test_parent_cancels(
cancel_method: str, cancel_method: str,
chk_ctx_result_before_exit: bool, chk_ctx_result_before_exit: bool,
child_returns_early: bool, child_returns_early: bool,
reg_addr: tuple,
debug_mode: bool, debug_mode: bool,
): ):
''' '''
@ -355,6 +360,7 @@ def test_parent_cancels(
async def main(): async def main():
async with tractor.open_nursery( async with tractor.open_nursery(
registry_addrs=[reg_addr],
debug_mode=debug_mode, debug_mode=debug_mode,
) as an: ) as an:
portal = await an.start_actor( portal = await an.start_actor(
@ -931,6 +937,7 @@ async def keep_sending_from_child(
) )
def test_one_end_stream_not_opened( def test_one_end_stream_not_opened(
overrun_by: tuple[str, int, Callable], overrun_by: tuple[str, int, Callable],
reg_addr: tuple,
debug_mode: bool, debug_mode: bool,
): ):
''' '''
@ -949,6 +956,7 @@ def test_one_end_stream_not_opened(
async def main(): async def main():
async with tractor.open_nursery( async with tractor.open_nursery(
registry_addrs=[reg_addr],
debug_mode=debug_mode, debug_mode=debug_mode,
) as an: ) as an:
portal = await an.start_actor( portal = await an.start_actor(
@ -1113,6 +1121,7 @@ def test_maybe_allow_overruns_stream(
# conftest wide # conftest wide
loglevel: str, loglevel: str,
reg_addr: tuple,
debug_mode: bool, debug_mode: bool,
): ):
''' '''
@ -1133,6 +1142,7 @@ def test_maybe_allow_overruns_stream(
''' '''
async def main(): async def main():
async with tractor.open_nursery( async with tractor.open_nursery(
registry_addrs=[reg_addr],
debug_mode=debug_mode, debug_mode=debug_mode,
) as an: ) as an:
portal = await an.start_actor( portal = await an.start_actor(
@ -1249,6 +1259,7 @@ def test_maybe_allow_overruns_stream(
def test_ctx_with_self_actor( def test_ctx_with_self_actor(
loglevel: str, loglevel: str,
reg_addr: tuple,
debug_mode: bool, debug_mode: bool,
): ):
''' '''
@ -1263,6 +1274,7 @@ def test_ctx_with_self_actor(
''' '''
async def main(): async def main():
async with tractor.open_nursery( async with tractor.open_nursery(
registry_addrs=[reg_addr],
debug_mode=debug_mode, debug_mode=debug_mode,
enable_modules=[__name__], enable_modules=[__name__],
) as an: ) as an: