mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
virtual-device: Implement cancel vfunc, to stop timeouts
This commit is contained in:
@@ -440,8 +440,6 @@ class VirtualDevice(unittest.TestCase):
|
||||
self.dev.close_sync()
|
||||
|
||||
def test_device_sleep(self):
|
||||
enrolled = self.enroll_print('testprint', FPrint.Finger.LEFT_LITTLE)
|
||||
|
||||
timeout_reached = False
|
||||
def on_timeout():
|
||||
nonlocal timeout_reached
|
||||
@@ -450,7 +448,8 @@ class VirtualDevice(unittest.TestCase):
|
||||
self.send_command('SLEEP', 1500)
|
||||
GLib.timeout_add(300, on_timeout)
|
||||
|
||||
self.start_verify(enrolled, identify=self.dev.supports_identify())
|
||||
self.start_verify(FPrint.Print.new(self.dev),
|
||||
identify=self.dev.supports_identify())
|
||||
while not timeout_reached:
|
||||
ctx.iteration(False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user