forked from goodboy/tractor
1
0
Fork 0

Adjust "no arbiter" test for new runtime defaults

Turns out this test was being silently ignored due to incorrect usage of
sync opening of our `.open_nursery()` block (with a `with` not `async
with`) and thus was an noop XD

Instead this fixes the test to call a `tractor` discovery built-in
without starting the runtime (which is now done implicitly when a user
opens a nursery) which should result in the prior expected outcome,
a `RuntimeError`.
eg_backup
Tyler Goodlet 2022-10-10 19:15:39 -04:00
parent 98056f6ed7
commit b15e4ed9ce
1 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ from conftest import tractor_test
@pytest.mark.trio @pytest.mark.trio
async def test_no_arbitter(): async def test_no_runtime():
"""An arbitter must be established before any nurseries """An arbitter must be established before any nurseries
can be created. can be created.
@ -19,7 +19,7 @@ async def test_no_arbitter():
some point?) some point?)
""" """
with pytest.raises(RuntimeError) : with pytest.raises(RuntimeError) :
with tractor.open_nursery(): async with tractor.find_actor('doggy'):
pass pass