[gnome-settings-daemon/benzea/ci-fixes: 6/19] tests: Use addClassCleanup in X11 session helper




commit 65ea74cf6d897b00debc81bd7b9727466952b0f5
Author: Benjamin Berg <bberg redhat com>
Date:   Mon Jul 19 17:07:05 2021 +0200

    tests: Use addClassCleanup in X11 session helper

 tests/x11session.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/tests/x11session.py b/tests/x11session.py
index 7fb0b834..faa22483 100644
--- a/tests/x11session.py
+++ b/tests/x11session.py
@@ -56,6 +56,8 @@ class X11SessionTestCase(DBusTestCase):
     @classmethod
     def setUpClass(klass):
         klass.start_xorg()
+        klass.addClassCleanup(klass.stop_xorg)
+
         klass.start_system_bus()
         klass.start_session_bus()
 
@@ -112,8 +114,3 @@ class X11SessionTestCase(DBusTestCase):
             klass.xorg.wait()
             del klass.xorg
 
-    @classmethod
-    def tearDownClass(klass):
-        DBusTestCase.tearDownClass()
-
-        klass.stop_xorg()


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