1
0
Эх сурвалжийг харах

integration tests: don't shadow real error when screenshot fails (#1608)

Masen Furer 1 жил өмнө
parent
commit
8c4183f500

+ 6 - 3
integration/conftest.py

@@ -51,6 +51,9 @@ def pytest_exception_interact(node, call, report):
         str(node.nodeid).strip().replace(" ", "_").replace(":", "_"),
     )
 
-    DISPLAY.waitgrab().save(
-        (Path(screenshot_dir) / safe_filename).with_suffix(".png"),
-    )
+    try:
+        DISPLAY.waitgrab().save(
+            (Path(screenshot_dir) / safe_filename).with_suffix(".png"),
+        )
+    except Exception as e:
+        print(f"Failed to take screenshot for {node}: {e}")