Add todo for running `test_debugger` suite on forkserver spawner
parent
2d4995e08d
commit
2917b74ba4
|
|
@ -65,9 +65,18 @@ def spawn(
|
||||||
run an `./examples/..` script by name.
|
run an `./examples/..` script by name.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
if start_method != 'trio':
|
supported_spawners: set[str] = {
|
||||||
|
'trio',
|
||||||
|
# ?TODO, other spawners that will work?
|
||||||
|
# - [ ] need to pass `start_method={spawner}` to underlying
|
||||||
|
# `examples/debugging/<script>.py` somehow?
|
||||||
|
# 'main_thread_forkserver',
|
||||||
|
# 'subint_forkserver',
|
||||||
|
}
|
||||||
|
if start_method not in supported_spawners:
|
||||||
pytest.skip(
|
pytest.skip(
|
||||||
'`pexpect` based tests only supported on `trio` backend'
|
f'`pexpect` based tests NOT supported on spawning-backend: {start_method!r}\n'
|
||||||
|
f'supported-spawners: {supported_spawners!r}'
|
||||||
)
|
)
|
||||||
|
|
||||||
def unset_colors():
|
def unset_colors():
|
||||||
|
|
@ -148,21 +157,38 @@ def spawn(
|
||||||
def ctlc(
|
def ctlc(
|
||||||
request: pytest.FixtureRequest,
|
request: pytest.FixtureRequest,
|
||||||
ci_env: bool,
|
ci_env: bool,
|
||||||
|
start_method: str,
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
'''
|
||||||
|
Parametrize and optionally skip tests which handle
|
||||||
|
ctlc-in-`pdbp`-REPL testing scenarios; certain spawners and actor-tree depths
|
||||||
|
cope very poorly with this..
|
||||||
|
|
||||||
|
In particular the spawning backends from `multiprocessing` are
|
||||||
|
fragile, as can be the default `trio` spawner under certain
|
||||||
|
conditions where SIGINT is relayed down the entire subproc tree.
|
||||||
|
|
||||||
|
'''
|
||||||
use_ctlc: bool = request.param
|
use_ctlc: bool = request.param
|
||||||
node = request.node
|
node = request.node
|
||||||
markers = node.own_markers
|
markers = node.own_markers
|
||||||
for mark in markers:
|
for mark in markers:
|
||||||
if mark.name == 'has_nested_actors':
|
if (
|
||||||
|
mark.name == 'has_nested_actors'
|
||||||
|
and
|
||||||
|
start_method not in {
|
||||||
|
# TODO, any spawners we should try again?
|
||||||
|
# - [ ] 'trio' but WITHOUT the SIGINT handler setup
|
||||||
|
# per subproc?
|
||||||
|
# 'main_thread_forkserver',
|
||||||
|
}
|
||||||
|
):
|
||||||
pytest.skip(
|
pytest.skip(
|
||||||
f'Test {node} has nested actors and fails with Ctrl-C.\n'
|
f'Test {node} has nested actors and fails with Ctrl-C.\n'
|
||||||
f'The test can sometimes run fine locally but until'
|
f'The test can sometimes run fine locally but until'
|
||||||
' we solve' 'this issue this CI test will be xfail:\n'
|
' we solve' 'this issue this CI test will be xfail:\n'
|
||||||
'https://github.com/goodboy/tractor/issues/320'
|
'https://github.com/goodboy/tractor/issues/320'
|
||||||
)
|
)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
mark.name == 'ctlcs_bish'
|
mark.name == 'ctlcs_bish'
|
||||||
and
|
and
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue