[gnome-settings-daemon/benzea/ci-fixes: 3/11] tests: Remove unneeded assert from OutputChecker




commit 8ed23c6b311da7ccacb4336abdc40fbd1da3dfb4
Author: Benjamin Berg <bberg redhat com>
Date:   Tue Jul 20 13:31:18 2021 +0200

    tests: Remove unneeded assert from OutputChecker

 tests/output_checker.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/output_checker.py b/tests/output_checker.py
index 765da9ce..453d2698 100644
--- a/tests/output_checker.py
+++ b/tests/output_checker.py
@@ -172,9 +172,9 @@ class OutputChecker(object):
         self._pipe_fd_w = -1
 
     def __del__(self):
-        if self._pipe_fd_r > 0:
+        if self._pipe_fd_r >= 0:
             os.close(self._pipe_fd_r)
-        if self._pipe_fd_w > 0:
+            self._pipe_fd_r = -1
+        if self._pipe_fd_w >= 0:
             os.close(self._pipe_fd_w)
-
-        assert not self._thread.is_alive()
+            self._pipe_fd_w = -1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]