Align show and doctor output columns

This commit is contained in:
mdaleo404 committed 2026-10-02 16:25:01 +01:00
1 parent a73c09cc9b
commit 9a44c3e158
5 files changed
+63 -26

No files matched your search

+11 -2
View File
@@ -96,9 +96,18 @@ def test_key_values_colour_labels_but_not_values() -> None:
stream = io.StringIO()
output = Output(color="always", stdout=stream)
output.key_values([("S", "active"), ("Status", "waiting")])
output.key_values([("S", "active"), ("Status", "waiting")], width=8)
assert stream.getvalue() == ("\033[1m\033[36mS \033[0m active\n\033[1m\033[36mStatus\033[0m waiting\n")
assert stream.getvalue() == ("\033[1m\033[36mS \033[0m active\n\033[1m\033[36mStatus \033[0m waiting\n")
def test_key_values_honours_requested_width() -> None:
stream = io.StringIO()
output = Output(color="never", stdout=stream)
output.key_values([("Key", "value")], width=6)
assert stream.getvalue() == "Key value\n"
def test_key_values_honours_no_color(monkeypatch) -> None: