forked from goodboy/tractor
1
0
Fork 0

Ensure tuple for passed in arbiter addr

msgspec_infect_asyncio
Tyler Goodlet 2021-09-06 12:07:09 -04:00
parent 82999d10df
commit bb8452dbdb
2 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,7 @@
""" """
Spawning basics Spawning basics
""" """
from typing import Dict, Tuple
import pytest import pytest
import trio import trio
@ -11,7 +12,11 @@ from conftest import tractor_test
data_to_pass_down = {'doggy': 10, 'kitty': 4} data_to_pass_down = {'doggy': 10, 'kitty': 4}
async def spawn(is_arbiter, data, arb_addr): async def spawn(
is_arbiter: bool,
data: Dict,
arb_addr: Tuple[str, int],
):
namespaces = [__name__] namespaces = [__name__]
await trio.sleep(0.1) await trio.sleep(0.1)

View File

@ -95,10 +95,10 @@ async def open_root_actor(
"Debug mode is only supported for the `trio` backend!" "Debug mode is only supported for the `trio` backend!"
) )
arbiter_addr = (host, port) = arbiter_addr or ( arbiter_addr = (host, port) = tuple(arbiter_addr or (
_default_arbiter_host, _default_arbiter_host,
_default_arbiter_port _default_arbiter_port,
) ))
loglevel = loglevel or log.get_loglevel() loglevel = loglevel or log.get_loglevel()
if loglevel is not None: if loglevel is not None: