diff --git a/tests/pyportaltest/test_inputcapture.py b/tests/pyportaltest/test_inputcapture.py index bb02d2f..4a3602d 100644 --- a/tests/pyportaltest/test_inputcapture.py +++ b/tests/pyportaltest/test_inputcapture.py @@ -618,7 +618,7 @@ def method_called(method_name, method_args, path): ) xdp_session.close() - self.mainloop.run() + self.setup_mainloop_with_timeout(timeout_ms=0).run() assert was_closed is True @@ -642,6 +642,6 @@ def session_closed(session): xdp_session.connect("closed", session_closed) session.enable() - self.mainloop.run() + self.setup_mainloop_with_timeout(timeout_ms=0).run() assert session_closed_signal_received is True diff --git a/tests/pyportaltest/test_remotedesktop.py b/tests/pyportaltest/test_remotedesktop.py index 0c63873..c230edf 100644 --- a/tests/pyportaltest/test_remotedesktop.py +++ b/tests/pyportaltest/test_remotedesktop.py @@ -571,7 +571,7 @@ def method_called(method_name, method_args, path): ) session.close() - self.mainloop.run() + self.setup_mainloop_with_timeout(timeout_ms=0).run() assert was_closed is True @@ -593,6 +593,6 @@ def session_closed(session): session.connect("closed", session_closed) - self.mainloop.run() + self.setup_mainloop_with_timeout(timeout_ms=0).run() assert session_closed_signal_received is True diff --git a/tests/pyportaltest/test_screencast.py b/tests/pyportaltest/test_screencast.py index 45d95f9..bc3b693 100644 --- a/tests/pyportaltest/test_screencast.py +++ b/tests/pyportaltest/test_screencast.py @@ -307,5 +307,5 @@ def method_called(method_name, method_args, path): ) session.close() - self.mainloop.run() + self.setup_mainloop_with_timeout(timeout_ms=0).run() assert was_closed is True