Drop run from multi prog tests
parent
cb527c2562
commit
b46e60ab9d
|
@ -1,10 +1,11 @@
|
||||||
"""
|
"""
|
||||||
Multiple python programs invoking ``tractor.run()``
|
Multiple python programs invoking the runtime.
|
||||||
"""
|
"""
|
||||||
import platform
|
import platform
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
import trio
|
||||||
import tractor
|
import tractor
|
||||||
from conftest import (
|
from conftest import (
|
||||||
tractor_test,
|
tractor_test,
|
||||||
|
@ -45,8 +46,13 @@ async def test_cancel_remote_arbiter(daemon, arb_addr):
|
||||||
def test_register_duplicate_name(daemon, arb_addr):
|
def test_register_duplicate_name(daemon, arb_addr):
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
assert not tractor.current_actor().is_arbiter
|
|
||||||
async with tractor.open_nursery() as n:
|
async with tractor.open_nursery(
|
||||||
|
arbiter_addr=arb_addr,
|
||||||
|
) as n:
|
||||||
|
|
||||||
|
assert not tractor.current_actor().is_arbiter
|
||||||
|
|
||||||
p1 = await n.start_actor('doggy')
|
p1 = await n.start_actor('doggy')
|
||||||
p2 = await n.start_actor('doggy')
|
p2 = await n.start_actor('doggy')
|
||||||
|
|
||||||
|
@ -57,4 +63,4 @@ def test_register_duplicate_name(daemon, arb_addr):
|
||||||
|
|
||||||
# run it manually since we want to start **after**
|
# run it manually since we want to start **after**
|
||||||
# the other "daemon" program
|
# the other "daemon" program
|
||||||
tractor.run(main, arbiter_addr=arb_addr)
|
trio.run(main)
|
||||||
|
|
Loading…
Reference in New Issue