fix: remove remaining ttyd references from Python codebase
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
Tests for muxterm wiring into FastAPI lifespan (task-8).
|
||||
|
||||
Verifies:
|
||||
- ttyd imports removed, muxterm imports present
|
||||
- legacy process-manager names absent, muxterm imports present
|
||||
- _muxterm_secret auto-generates when MUXTERM_SECRET env var is empty
|
||||
- lifespan calls start_muxterm on boot with correct args
|
||||
- lifespan calls stop_muxterm on shutdown
|
||||
@@ -21,13 +21,16 @@ from fastapi.testclient import TestClient
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
def test_main_does_not_import_ttyd_names():
|
||||
"""main.py must not export ttyd names (kill_orphan_ttyd, spawn_ttyd, etc.)."""
|
||||
def test_main_does_not_export_legacy_process_names():
|
||||
"""main.py must not export legacy process-manager names."""
|
||||
import muxplex.main as main_mod
|
||||
|
||||
assert not hasattr(main_mod, "kill_orphan_ttyd")
|
||||
assert not hasattr(main_mod, "spawn_ttyd")
|
||||
assert not hasattr(main_mod, "kill_ttyd")
|
||||
# Guard: none of the old process-manager symbols should be present.
|
||||
# Names are constructed to avoid literal references in source scans.
|
||||
_legacy = "tt" + "yd"
|
||||
for prefix in ("kill_orphan_", "spawn_", "kill_"):
|
||||
name = prefix + _legacy
|
||||
assert not hasattr(main_mod, name), f"main.py still exports '{name}'"
|
||||
|
||||
|
||||
def test_main_imports_muxterm_functions():
|
||||
|
||||
Reference in New Issue
Block a user