Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a15bf98

Browse files
committedJun 14, 2024·
process events and wait longer to avoid test issues
1 parent de4af50 commit a15bf98

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
 

‎src/silx/gui/dialog/test/test_datafiledialog.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# /*##########################################################################
22
#
3-
# Copyright (c) 2016-2022 European Synchrotron Radiation Facility
3+
# Copyright (c) 2016-2024 European Synchrotron Radiation Facility
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal
@@ -115,10 +115,11 @@ def _deleteDialog(self):
115115
self.qWaitForDestroy(ref)
116116

117117
def qWaitForPendingActions(self, dialog):
118+
self.qapp.processEvents()
118119
for _ in range(20):
119120
if not dialog.hasPendingEvents():
120121
return
121-
self.qWait(10)
122+
self.qWait(100)
122123
raise RuntimeError("Still have pending actions")
123124

124125
def assertSamePath(self, path1, path2):

‎src/silx/gui/dialog/test/test_imagefiledialog.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# /*##########################################################################
22
#
3-
# Copyright (c) 2016-2022 European Synchrotron Radiation Facility
3+
# Copyright (c) 2016-2024 European Synchrotron Radiation Facility
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal
@@ -122,10 +122,11 @@ def _deleteDialog(self):
122122
self.qWaitForDestroy(ref)
123123

124124
def qWaitForPendingActions(self, dialog):
125+
self.qapp.processEvents()
125126
for _ in range(20):
126127
if not dialog.hasPendingEvents():
127128
return
128-
self.qWait(10)
129+
self.qWait(100)
129130
raise RuntimeError("Still have pending actions")
130131

131132
def assertSamePath(self, path1, path2):

0 commit comments

Comments
 (0)
Please sign in to comment.