From fd9a86eca4e2d5cff4b23cc06d23247f40ffc7c3 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Tue, 12 May 2020 18:54:40 +0200 Subject: [PATCH] tests: Fail test if return code is less than 0 This means that the application received a signal. --- tests/fprintd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/fprintd.py b/tests/fprintd.py index fe0cbb1..65ec232 100644 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -252,7 +252,9 @@ class FPrintdTest(dbusmock.DBusTestCase): self.daemon.terminate() except OSError: pass - self.assertLess(self.daemon.wait(timeout=2), 128) + self.daemon.wait(timeout=2) + self.assertLess(self.daemon.returncode, 128) + self.assertGreaterEqual(self.daemon.returncode, 0) self.daemon = None