fix(test): update doctor test assertions for Rich markup (#197)

PR #170 added Rich markup tags to doctor output, but the test
still asserted against plain text. Strip markup before assertion.

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
This commit is contained in:
Pnant 2026-03-23 18:42:14 +08:00 committed by GitHub
parent 15563051a1
commit 881d9b96e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,9 +90,12 @@ class TestDoctor:
}
)
assert "Agent Reach" in report
assert "✅ 装好即用:" in report
assert "搜索mcporter 即可解锁):" in report
assert "配置后可用:" in report
assert "状态1/3 个渠道可用" in report
assert "运行 `agent-reach setup` 解锁更多渠道" in report
# Strip Rich markup tags for assertion (PR #170 added [bold], [yellow] etc.)
import re
plain = re.sub(r"\[[^\]]*\]", "", report)
assert "Agent Reach" in plain
assert "装好即用:" in plain
assert "搜索mcporter 即可解锁):" in plain
assert "配置后可用:" in plain
assert "1/3 个渠道可用" in plain
assert "agent-reach setup" in plain