Fix: Multi-window UI tests can produce inconsistent results
After creating a new scene in a separate window when performing UI tests, the respective view layer for the window may not be updated immediately in the event loop. Previously, this was mitigated with a single `yield` statement that would delay processing by a single tick. To fix this issue, this commit adds the capability to yield for a specific `timedelta` and waits this amount of time for the two affected tests. Pull Request: https://projects.blender.org/blender/blender/pulls/136012
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import datetime
|
||||
import string
|
||||
import bpy
|
||||
event_types = tuple(
|
||||
@@ -341,6 +342,8 @@ def run(
|
||||
|
||||
if isinstance(val, EventGenerate) or val is None:
|
||||
return 0.0
|
||||
elif isinstance(val, datetime.timedelta):
|
||||
return val.total_seconds()
|
||||
elif val is Ellipsis:
|
||||
if on_exit is not None:
|
||||
on_exit()
|
||||
|
||||
Reference in New Issue
Block a user