From 3821b96ca5028b76bf012b410b44362769b1644f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 8 Feb 2020 09:37:08 +0100 Subject: [PATCH] tests/fprintd: Only enable 'virtual_image' driver When we run tests in a system with real devices, we may try to initialize the real ones, while we can just ignore them all in tests. We do it in setUp instead of setUpClass to allow tests to change this if they need to, but just for temporary. --- tests/fprintd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/fprintd.py b/tests/fprintd.py index f5e604e..91950c0 100755 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -262,6 +262,7 @@ class FPrintdTest(dbusmock.DBusTestCase): self.addCleanup(shutil.rmtree, self.test_dir) self.state_dir = os.path.join(self.test_dir, 'state') self.run_dir = os.path.join(self.test_dir, 'run') + os.environ['FP_DRIVERS_WHITELIST'] = 'virtual_image' # From libfprint tests def send_retry(self, retry_error=FPrint.DeviceRetry.TOO_SHORT):