tests: Ensure python tests exit with error on every exception

We ignored assertions happening on callbacks as they only raise
exceptions that does not stop the execution.

So ensure that this is happening in all the tests as synaptics was
doing already
This commit is contained in:
Marco Trevisan (Treviño)
2022-09-28 01:22:15 +02:00
parent d2a0eda56c
commit be88884315
5 changed files with 26 additions and 3 deletions

View File

@@ -21,6 +21,9 @@ except Exception as e:
FPrint = None
# Exit with error on any exception, included those happening in async callbacks
sys.excepthook = lambda *args: (traceback.print_exception(*args), sys.exit(1))
def load_image(img):
png = cairo.ImageSurface.create_from_png(img)