Mk `test_no_runtime()` not require `pytest-trio`

subint_forkserver_backend
Gud Boi 2026-05-13 20:43:22 -04:00
parent bd07a95d80
commit 79dda4cb4a
1 changed files with 9 additions and 5 deletions

View File

@ -10,18 +10,22 @@ import tractor
from tractor._testing import tractor_test
@pytest.mark.trio
async def test_no_runtime():
"""A registrar must be established before any nurseries
def test_no_runtime():
'''
A registrar 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) :
'''
async def main():
async with tractor.find_actor('doggy'):
pass
with pytest.raises(tractor._exceptions.NoRuntime) :
trio.run(main)
@tractor_test
async def test_self_is_registered(reg_addr):