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