diff --git a/.packit.yaml b/.packit.yaml index 0ea96e2..fe150d7 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -20,6 +20,7 @@ jobs: - job: copr_build trigger: pull_request targets: + - fedora-rawhide - fedora-eln - job: copr_build diff --git a/simpleline/event_loop/glib_event_loop.py b/simpleline/event_loop/glib_event_loop.py index 1d98797..5519def 100644 --- a/simpleline/event_loop/glib_event_loop.py +++ b/simpleline/event_loop/glib_event_loop.py @@ -43,8 +43,9 @@ class GLibEventLoop(AbstractEventLoop): - def __init__(self): + def __init__(self, blocking=True): super().__init__() + self._blocking = blocking # Create first loop loop = GLib.MainLoop() self._event_loops = [EventLoopData(loop)] @@ -208,12 +209,9 @@ def process_signals(self, return_after=None): else: self._iterate_event_loop(loop_data.loop) - @staticmethod - def _iterate_event_loop(event_loop): + def _iterate_event_loop(self, event_loop): context = event_loop.get_context() - # This is useful for tests - wait_on_timeout = False - context.iteration(wait_on_timeout) + context.iteration(self._blocking) class EventLoopData(): diff --git a/tests/units/glib/__init__.py b/tests/units/glib/__init__.py index 7574516..21c8257 100644 --- a/tests/units/glib/__init__.py +++ b/tests/units/glib/__init__.py @@ -42,7 +42,7 @@ def _quit_loop(self, loop): def create_glib_loop(self): # clear flags self.timeout_error = False - self.loop = GLibEventLoop() + self.loop = GLibEventLoop(blocking=False) loop = self.loop.active_main_loop context = loop.get_context()