All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization][PATCH] test_vdkr_registry: fix test_image_requires_subcommand
@ 2026-04-28  0:33 Tim Orling
  2026-04-28 11:47 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Orling @ 2026-04-28  0:33 UTC (permalink / raw)
  To: meta-virtualization; +Cc: Tim Orling

vdkr.run() merges stderr into stdout (see conftest.py), so the
error message ends up in result.stdout even though the script
writes it to stderr (>&2).

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 tests/test_vdkr_registry.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/test_vdkr_registry.py b/tests/test_vdkr_registry.py
index 9073444d..72a27169 100644
--- a/tests/test_vdkr_registry.py
+++ b/tests/test_vdkr_registry.py
@@ -259,7 +259,11 @@ class TestImageCompoundCommands:
         """Test that 'image' without subcommand shows error."""
         result = self.vdkr.run("image", check=False)
         assert result.returncode != 0
-        assert "subcommand" in result.stderr.lower() or "requires" in result.stderr.lower()
+        # vdkr.run() merges stderr into stdout (see conftest.py), so the
+        # error message ends up in result.stdout even though the script
+        # writes it to stderr (>&2).
+        combined = (result.stdout + result.stderr).lower()
+        assert "subcommand" in combined or "requires" in combined
 
 
 class TestRegistryCLIOverride:
-- 
2.50.1 (Apple Git-155)



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-28 11:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28  0:33 [meta-virtualization][PATCH] test_vdkr_registry: fix test_image_requires_subcommand Tim Orling
2026-04-28 11:47 ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.