[elbe-devel] [PATCH 04/10] elbepack: test: show exception output
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon Mar 11 18:02:57 CET 2024
pytest does not have the custom logic of our test runner to show the
output. Instead make the output part of the exception string.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/commands/test.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/elbepack/commands/test.py b/elbepack/commands/test.py
index ce62836d21a8..eba7d0aa7064 100644
--- a/elbepack/commands/test.py
+++ b/elbepack/commands/test.py
@@ -32,11 +32,8 @@ class ElbeTestException(Exception):
self.ret = ret
self.out = out
- def __repr__(self):
- return f'ElbeTestException: \"{self.cmd}\" returns {self.ret}'
-
def __str__(self):
- return f'ElbeTestException: \"{self.cmd}\" returns {self.ret}'
+ return f'ElbeTestException: \"{self.cmd}\" returns {self.ret}\noutput:\n{self.out}'
def system(cmd, allow_fail=False):
--
2.44.0
More information about the elbe-devel
mailing list