tractor/tests/devx
Gud Boi 3854cf5ecb Strip ANSI + accept `_create(...)` in devx tests
Two version-compat fixes for the `devx` debugger
test-suite, both about matching upstream output that
got more verbose w/ recent lib releases.

ANSI stripping (`tests/devx/conftest.py`),
- Add `ansi_strip(text)` helper + `_ansi_re` pattern
  (regex per https://stackoverflow.com/a/14693789).
- Apply inside `in_prompt_msg()` + `assert_before()` so
  substring matches against REPL/traceback output stay
  robust to color leakage.
- Motivated by py3.13's colored tracebacks +
  `pdbp`/pygments highlighting leaking ANSI even when
  `PYTHON_COLORS=0` is set in the `spawn` fixture (not
  every renderer in the spawned subproc honors it).
- Replaces the longstanding inline TODO that linked
  the SO answer w/o impl'ing.

trio 0.30+ `Cancelled._create(` match (`test_debugger`),
- In `test_shield_pause` swap the two
  `"raise Cancelled._create()"` assertion patterns →
  `"raise Cancelled._create("` (open-paren form, no
  closing).
- trio >=0.30 raises a multi-line
  `raise Cancelled._create(source=.., reason=..,
  source_task=..)` w/ cancel-reason metadata, so the
  legacy bare-`()` form no longer matches. Inline
  comment documents the trio-version pivot.

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-06-02 00:41:06 -04:00
..
__init__.py Officially test proto-ed `stackscope` integration 2025-03-27 13:24:25 -04:00
conftest.py Strip ANSI + accept `_create(...)` in devx tests 2026-06-02 00:41:06 -04:00
test_debugger.py Strip ANSI + accept `_create(...)` in devx tests 2026-06-02 00:41:06 -04:00
test_pause_from_non_trio.py Update `sync_bp` + tighten `test_pause_from_sync` 2026-04-30 20:54:50 -04:00
test_proctitle.py Add per-actor `setproctitle` via `devx._proctitle` 2026-05-08 00:04:48 -04:00
test_tooling.py Adjust `test_shield_pause` for capsys backends 2026-05-01 19:08:55 -04:00