Drop test-local timeouts, +`sync_pause` to dev

In `pyproject.toml`,
- include the `sync_pause` group from `dev`, so dev
  installs ship `greenback` for `pause_from_sync()`.

Comment out per-test `@pytest.mark.timeout(...)`
markers in,
- `tests/devx/test_debugger.py`
- `tests/discovery/test_registrar.py`
- `tests/spawn/test_main_thread_forkserver.py`
- `tests/spawn/test_subint_cancellation.py`
- `tests/test_advanced_streaming.py`
- `tests/test_cancellation.py`

The global cap was already dropped (3c366cac); these
were the leftover per-test caps which now block
interactive `pdb` flows under the new spawn backends.

In `uv.lock`,
- pull `greenback` into the resolved `dev` deps
  (per the `sync_pause` include above).
- catch up the prior `xonsh` editable→PyPI switch
  (from the `pyproject.toml` `tool.uv.sources` edit).

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code

(cherry picked from commit b7115fc875)
(factored: dropped spawn-backend-only paths under tests/spawn/)
test_suite_hardening
Gud Boi 2026-06-09 20:23:26 -04:00
parent 0bd1d27443
commit c0b719a3ff
7 changed files with 25 additions and 26 deletions

View File

@ -67,6 +67,7 @@ dev = [
{include-group = 'devx'},
{include-group = 'testing'},
{include-group = 'repl'},
{include-group = 'sync_pause'},
]
devx = [
# `tractor.devx` tooling

View File

@ -4,6 +4,7 @@
'''
from __future__ import annotations
import platform
import os
import re
import signal
import time
@ -90,7 +91,6 @@ def spawn(
https://docs.python.org/3/using/cmdline.html#using-on-controlling-color
'''
import os
# disable colored tbs
os.environ['PYTHON_COLORS'] = '0'
# disable all ANSI color output
@ -106,7 +106,6 @@ def spawn(
without requiring per-script CLI plumbing.
'''
import os
os.environ['TRACTOR_SPAWN_METHOD'] = start_method
def set_loglevel(
@ -120,7 +119,6 @@ def spawn(
the test harness without per-script edits.
'''
import os
if loglevel:
os.environ['TRACTOR_LOGLEVEL'] = loglevel
else:
@ -192,13 +190,11 @@ def spawn(
if ptyproc.isalive():
ptyproc.kill(signal.SIGKILL)
# Scope our env-var mutations to this single fixture
# invocation — both `TRACTOR_SPAWN_METHOD` and
# `TRACTOR_LOGLEVEL` are honored by
# `tractor._root.open_root_actor()` so leaking them past
# this test could inadvertently re-route a later
# in-process tractor test's spawn-backend / loglevel.
import os
# Scope our env-var mutations to this single fixture invocation
# — both `TRACTOR_SPAWN_METHOD` and `TRACTOR_LOGLEVEL` are
# honored by `tractor._root.open_root_actor()` so leaking them
# past this test could inadvertently re-route a later in-process
# tractor test's spawn-backend / loglevel.
os.environ.pop('TRACTOR_SPAWN_METHOD', None)
os.environ.pop('TRACTOR_LOGLEVEL', None)

View File

@ -841,7 +841,7 @@ def test_multi_nested_subactors_error_through_nurseries(
)
@pytest.mark.timeout(15)
# @pytest.mark.timeout(15)
@has_nested_actors
def test_root_nursery_cancels_before_child_releases_tty_lock(
spawn,

View File

@ -535,13 +535,13 @@ async def kill_transport(
# At timeout the plugin hard-kills the pytest process — that's
# the intended behavior here; the alternative is an unattended
# suite run that never returns.
@pytest.mark.timeout(
30,
# NOTE should be a 2.1s happy path.
# XXX for `main_thread_forkserver` this is SUPER SENSITIVE
# so keep it higher to avoid flaky runs..
method='thread',
)
# @pytest.mark.timeout(
# 30,
# # NOTE should be a 2.1s happy path.
# # XXX for `main_thread_forkserver` this is SUPER SENSITIVE
# # so keep it higher to avoid flaky runs..
# method='thread',
# )
@pytest.mark.skipon_spawn_backend(
'subint',
# 'main_thread_forkserver',

View File

@ -430,10 +430,10 @@ async def inf_streamer(
print('streamer exited .open_streamer() block')
@pytest.mark.timeout(
6,
method='signal',
)
# @pytest.mark.timeout(
# 6,
# method='signal',
# )
def test_local_task_fanout_from_stream(
reg_addr: tuple,
debug_mode: bool,

View File

@ -458,10 +458,10 @@ async def spawn_and_error(
# `test_nested_multierrors`. See
# `ai/conc-anal/subint_forkserver_test_cancellation_leak_issue.md`
# / #449 for the post-mortem.
@pytest.mark.timeout(
10,
method='thread',
)
# @pytest.mark.timeout(
# 10,
# method='thread',
# )
@tractor_test
async def test_nested_multierrors(
reg_addr: tuple,

View File

@ -732,6 +732,7 @@ dependencies = [
[package.dev-dependencies]
dev = [
{ name = "greenback", marker = "python_full_version < '3.14'" },
{ name = "pexpect" },
{ name = "prompt-toolkit" },
{ name = "psutil" },
@ -787,6 +788,7 @@ requires-dist = [
[package.metadata.requires-dev]
dev = [
{ name = "greenback", marker = "python_full_version == '3.13.*'", specifier = ">=1.2.1,<2" },
{ name = "pexpect", specifier = ">=4.9.0,<5" },
{ name = "prompt-toolkit", specifier = ">=3.0.50" },
{ name = "psutil", specifier = ">=7.0.0" },