diff --git a/tests/fprintd.py b/tests/fprintd.py index 0bd9ac3..7351980 100755 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -1123,8 +1123,8 @@ class FPrintdUtilsTest(FPrintdVirtualDeviceBaseTest): env=env, stdout=None, stderr=subprocess.STDOUT) - self.addCleanup(self.utils_proc[name].terminate) self.addCleanup(self.utils_proc[name].wait) + self.addCleanup(self.utils_proc[name].terminate) return self.utils_proc[name] def test_vanished_client_operation_is_cancelled(self): diff --git a/tests/test_fprintd_utils.py b/tests/test_fprintd_utils.py index 4cc1841..e609b83 100755 --- a/tests/test_fprintd_utils.py +++ b/tests/test_fprintd_utils.py @@ -93,9 +93,9 @@ class TestFprintdUtilsBase(dbusmock.DBusTestCase): flags = fcntl.fcntl(process.stdout, fcntl.F_GETFL) fcntl.fcntl(process.stdout, fcntl.F_SETFL, flags | os.O_NONBLOCK) - self.addCleanup(lambda: print(process.stdout.read())) - self.addCleanup(process.terminate) self.addCleanup(process.wait) + self.addCleanup(process.terminate) + self.addCleanup(lambda: print(process.stdout.read())) if sleep: time.sleep(self.sleep_time)