1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2025-07-26 11:57:51 +02:00

tests: Ensure Python assertEventually() function uses correct main context

It should be doing already (or the tests would never work), but make it
clearer in the code that the same `GMainContext` is being iterated as is
being woken up in the rest of the test.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: 
This commit is contained in:
Philip Withnall
2024-01-22 11:22:01 +00:00
parent aee343fe5c
commit 5278efbd63
2 changed files with 2 additions and 4 deletions

@@ -73,8 +73,7 @@ try:
printed on failure. printed on failure.
''' '''
while timeout >= 0: while timeout >= 0:
context = GLib.MainContext.default() while self.main_context.iteration(False):
while context.iteration(False):
pass pass
if condition(): if condition():
break break

@@ -73,8 +73,7 @@ try:
printed on failure. printed on failure.
''' '''
while timeout >= 0: while timeout >= 0:
context = GLib.MainContext.default() while self.main_context.iteration(False):
while context.iteration(False):
pass pass
if condition(): if condition():
break break