tests: pin override and MISSING tag colours in the text tree

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
This commit is contained in:
Ole-Morten Duesund 2026-08-25 16:06:54 +02:00
commit baba4e0205

View file

@ -344,7 +344,10 @@ def test_text_and_html_render(report, tmp_path):
coloured = conandeps.render_text(report, color=True) coloured = conandeps.render_text(report, color=True)
assert "\033[1;31mMISSING\033[0m" in coloured and "\033[32mtest\033[0m" in coloured assert "\033[1;31mMISSING\033[0m" in coloured and "\033[32mtest\033[0m" in coloured
assert "\033[2mlibfoo -> libbar -> libdeep\033[0m" in coloured # tree path tag, dim # Tree tags: path dim, override yellow, MISSING bold red.
assert "\033[2mlibfoo -> libbar -> libdeep\033[0m" in coloured
assert "\033[33moverrides libbar/1.0 (explicit by your conanfile)\033[0m" in coloured
assert "\033[1;31mMISSING: Debug,RelWithDebInfo\033[0m" in coloured
# Colour codes must not break column alignment: same visible layout. # Colour codes must not break column alignment: same visible layout.
strip = conandeps._ANSI_RE.sub strip = conandeps._ANSI_RE.sub
assert strip("", coloured) == text assert strip("", coloured) == text