Mk `test_no_runtime()` not require `pytest-trio`
(cherry picked from commit 79dda4cb4a)
wkt/tooling_enhancements_from_mtf_spawner
parent
d7df429f03
commit
f2871ae3ff
|
|
@ -10,18 +10,22 @@ import tractor
|
||||||
from tractor._testing import tractor_test
|
from tractor._testing import tractor_test
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.trio
|
def test_no_runtime():
|
||||||
async def test_no_runtime():
|
'''
|
||||||
"""A registrar must be established before any nurseries
|
A registrar must be established before any nurseries
|
||||||
can be created.
|
can be created.
|
||||||
|
|
||||||
(In other words ``tractor.open_root_actor()`` must be
|
(In other words ``tractor.open_root_actor()`` must be
|
||||||
engaged at some point?)
|
engaged at some point?)
|
||||||
"""
|
|
||||||
with pytest.raises(RuntimeError) :
|
'''
|
||||||
|
async def main():
|
||||||
async with tractor.find_actor('doggy'):
|
async with tractor.find_actor('doggy'):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
with pytest.raises(tractor._exceptions.NoRuntime) :
|
||||||
|
trio.run(main)
|
||||||
|
|
||||||
|
|
||||||
@tractor_test
|
@tractor_test
|
||||||
async def test_self_is_registered(reg_addr):
|
async def test_self_is_registered(reg_addr):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue