tests: IDE: force reporting screenshot even after failing command
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Fri, 15 Jul 2022 14:48:29 +0200
changeset 3544 f2dff88db448
parent 3543 6210c08c1c41
child 3545 67e1707f24c8
tests: IDE: force reporting screenshot even after failing command
tests/ide_tests/sikuliberemiz.py
--- a/tests/ide_tests/sikuliberemiz.py	Fri Jul 15 14:47:23 2022 +0200
+++ b/tests/ide_tests/sikuliberemiz.py	Fri Jul 15 14:48:29 2022 +0200
@@ -273,8 +273,10 @@
             def makeMyMeth(n):
                 def myMeth(*args, **kwargs):
                     self.ReportScreenShot("Begin: " + n + "(" + repr(args) + "," + repr(kwargs) + ")")
-                    getattr(sikuli, n)(*args, **kwargs)
-                    self.ReportScreenShot("end: " + n + "(" + repr(args) + "," + repr(kwargs) + ")")
+                    try:
+                        getattr(sikuli, n)(*args, **kwargs)
+                    finally:
+                        self.ReportScreenShot("end: " + n + "(" + repr(args) + "," + repr(kwargs) + ")")
                 return myMeth
             setattr(self, name, makeMyMeth(name))