From b15e4ed9ce9addc131a2015ba80c7ccf6bab1247 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 10 Oct 2022 19:15:39 -0400 Subject: [PATCH] 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`. --- tests/test_local.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_local.py b/tests/test_local.py index 47a7c43..97a8328 100644 --- a/tests/test_local.py +++ b/tests/test_local.py @@ -11,15 +11,15 @@ from conftest import tractor_test @pytest.mark.trio -async def test_no_arbitter(): +async def test_no_runtime(): """An arbitter must be established before any nurseries can be created. (In other words ``tractor.open_root_actor()`` must be engaged at some point?) """ - with pytest.raises(RuntimeError): - with tractor.open_nursery(): + with pytest.raises(RuntimeError) : + async with tractor.find_actor('doggy'): pass