-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document the GuiTestAssistant and ModalDialogTester #933
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM. @corranwebster @mdickinson do you have any feedback?
When testing modal dialog related code the main recommendation for doing so is | ||
try to avoid it. If you can, try testing the dialog in a non-modal fashion. Or, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's kinda blunt :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good! A couple of comments. The main comment is that we need to be very clear that some of the GuiTestAssistant
methods are designed to be used as context managers, and using them without a with
statement may have surprising effects.
|
||
- :meth:`event_loop_until_condition` | ||
|
||
Runs the real Qt event loop until the provided condition evaluates to True. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One current usage difficulty with GuiTestAssistant
is figuring out which methods are context managers: some of the methods are designed to be used a context managers, and if used without a with
statement do nothing instead. (We've had more than one bug in real code as a result of this.)
It would be worth clearly noting for each method whether its return value is intended to be used as a context manager or not.
…ion find_qt_widget problems)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one minor change suggestion
Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
closes #904
This PR adds a "GUI Testing" section to the documentation describing the
GuiTestAssistant
andModalDialogTester
.