Addons: tweak gui_mocks dialog timing to avoid leaving windows after … (#15022)

* Addons: tweak gui_mocks dialog timing to avoid leaving windows after testing.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
bgbsww
2024-06-29 19:14:37 -04:00
committed by GitHub
parent a42a961b76
commit 5545718086

View File

@@ -45,7 +45,9 @@ class DialogInteractor(QtCore.QObject):
self.execution_counter = 0
self.timer = QtCore.QTimer()
self.timer.timeout.connect(self.run)
self.timer.start(10)
self.timer.start(
1
) # At 10 this occasionally left open dialogs; less than 1 produced failed tests
def run(self):
widget = QtWidgets.QApplication.activeModalWidget()