Description: Yet another attempt to figure out what goes wrong
 Dump the contents of the tina pane on a test failure.
Forwarded: yes
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2025-01-29

--- a/tests/python/unit/mgr/util.py
+++ b/tests/python/unit/mgr/util.py
@@ -9,6 +9,7 @@
 import pathlib
 import shlex
 import shutil
+import sys
 import tempfile
 import time
 import typing
@@ -196,4 +197,11 @@
         if count < height - 4:
             tina.assert_no_text_at(0, len(db_entries) + 2)
 
-        yield tina, db_entries
+        try:
+            yield tina, db_entries
+        except BaseException as err:
+            err_type: Final = type(err).__name__
+            print(f"Dumping the tina pane because of an error: {err_type}", file=sys.stderr)
+            print("\n".join(tina.pane.capture_pane()), file=sys.stderr)
+            print(f"Reraising the {err_type} error", file=sys.stderr)
+            raise
