mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-17 12:58:48 +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: #2887
This commit is contained in:
parent
aee343fe5c
commit
5278efbd63
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user