PR: Use static calls of exec_ elsewhere where needed, and test them#422
PR: Use static calls of exec_ elsewhere where needed, and test them#422dalthviz merged 17 commits intospyder-ide:masterfrom
exec_ elsewhere where needed, and test them#422Conversation
|
The mistake of mine was in the following lines: QtCore.QTimer.singleShot(100, lambda: qtbot.keyClick(
QtWidgets.QApplication.widgetAt(1, 1),
QtCore.Qt.Key.Key_Escape)
# namely, ↑↑↑ up here
)In As I don't use Windows, and the problem appears only on Windows, I couldn't catch the problem locally. The third time's a charm. |
Thanks, I opened #423 to document that. |
QMenu.exec_ callQMenu.exec_ call
|
(Fixed the |
CAM-Gerlach
left a comment
There was a problem hiding this comment.
Sorry, didn't realize I hadn't actually reviewed this.
If it might be used in multiple modules, maybe better to move _possibly_static_exec to utils? Thoughts?
Beyond that, I didn't spot any obvious blocking issues with this, so otherwise leaving this to @dalthviz 's expertise to review further.
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
I've looked through
and found that As for |
Thanks a lot! That's a marvelous solution! |
|
Surprisingly, the tests for |
CAM-Gerlach
left a comment
There was a problem hiding this comment.
Thanks! All looks pretty reasonable to me now, but I'll leave it to @dalthviz 's greater expertise to review further, thanks.
QMenu.exec_ callexec_ elsewhere where needed, and test them
dalthviz
left a comment
There was a problem hiding this comment.
Thanks @StSav012 ! LGTM 👍 But, just in case, what do you think @ccordoba12 ?
The help for
QMenu.exec_reads something like the following (the order might be different, and fully qualified Qt class names might appear):The first option here is a static call to
QMenu.exec_. In the QtPy tests, such a call is never tested. So, here it is. As one might expect, it fails. Use the_possibly_static_execfunction to fix the errors.