Restore spawner-aware `ctlc` skip + richer skip-msg
Bring back two `tests/devx/conftest.py` refinements whose carrying commit was otherwise superseded during the sub-branch factoring: - `ctlc` fixture takes `start_method` and documents the per-spawner fragility of ctl-c-in-REPL scenarios via a docstring + an (empty for now) allow-set for the `has_nested_actors` skip. - `spawn` fixture's unsupported-backend skip msg now reports the requested backend + the supported set. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-codetest_suite_hardening
parent
4b4f6579b4
commit
d7ac9ee4a4
|
|
@ -79,7 +79,8 @@ def spawn(
|
|||
}
|
||||
if start_method not in supported_spawners:
|
||||
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():
|
||||
|
|
@ -211,21 +212,38 @@ def spawn(
|
|||
def ctlc(
|
||||
request: pytest.FixtureRequest,
|
||||
ci_env: bool,
|
||||
|
||||
start_method: str,
|
||||
) -> 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
|
||||
node = request.node
|
||||
markers = node.own_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(
|
||||
f'Test {node} has nested actors and fails with Ctrl-C.\n'
|
||||
f'The test can sometimes run fine locally but until'
|
||||
' we solve' 'this issue this CI test will be xfail:\n'
|
||||
'https://github.com/goodboy/tractor/issues/320'
|
||||
)
|
||||
|
||||
if (
|
||||
mark.name == 'ctlcs_bish'
|
||||
and
|
||||
|
|
|
|||
Loading…
Reference in New Issue