[gnome-settings-daemon/benzea/tests-output-checker-testing] tests: cleanup on __del__
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/benzea/tests-output-checker-testing] tests: cleanup on __del__
- Date: Mon, 15 Feb 2021 14:34:37 +0000 (UTC)
commit 7ca3fc4e1883542c87a94dfadeec0f8869553d3a
Author: Benjamin Berg <bberg redhat com>
Date: Mon Feb 15 15:27:02 2021 +0100
tests: cleanup on __del__
tests/output_checker.py | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/tests/output_checker.py b/tests/output_checker.py
index 36be8225..b5f055d8 100644
--- a/tests/output_checker.py
+++ b/tests/output_checker.py
@@ -168,3 +168,10 @@ class OutputChecker(object):
def writer_attached(self):
pass
+ def __del__(self):
+ if self._pipe_fd_r > 0:
+ os.close(self._pipe_fd_r)
+ if self._pipe_fd_w > 0:
+ os.close(self._pipe_fd_w)
+
+ assert not self._thread.is_alive()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]