forked from goodboy/tractor
1
0
Fork 0

Ensure tuple for passed in arbiter addr

optional_msgspec_support
Tyler Goodlet 2021-09-06 12:07:09 -04:00
parent dbc4e3dd46
commit 19d6885243
2 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,7 @@
"""
Spawning basics
"""
from typing import Dict, Tuple
import pytest
import trio
@ -11,7 +12,11 @@ from conftest import tractor_test
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__]
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!"
)
arbiter_addr = (host, port) = arbiter_addr or (
arbiter_addr = (host, port) = tuple(arbiter_addr or (
_default_arbiter_host,
_default_arbiter_port
)
_default_arbiter_port,
))
loglevel = loglevel or log.get_loglevel()
if loglevel is not None: