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




commit 74b7b9e20de363eb35353cad44aeac9856ccd484
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]