mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-05-09 08:38:20 +02:00
tests/fpcmoc: 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
Same as commit: be8888431
This commit is contained in:
parent
cca2b6a624
commit
0b6a92150c
1 changed files with 6 additions and 0 deletions
|
|
@ -1,9 +1,15 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import traceback
|
||||
import sys
|
||||
import gi
|
||||
|
||||
gi.require_version('FPrint', '2.0')
|
||||
from gi.repository import FPrint, GLib
|
||||
|
||||
# Exit with error on any exception, included those happening in async callbacks
|
||||
sys.excepthook = lambda *args: (traceback.print_exception(*args), sys.exit(1))
|
||||
|
||||
ctx = GLib.main_context_default()
|
||||
|
||||
c = FPrint.Context()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue