-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
test, fix invalid user-provided startup() method #2047
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.
Looks good; a couple of minor suggestions provided as diffs.
The only other problem I can see is that there's no test of the DocumentApp analog of this process. It's technically covered, but there's no validation that it's actually happening.
I added a test for the DocumentApp path, and CI is passing. |
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.
I've made a couple of minor tweaks to the error message wording, but otherwise this looks great! Thanks for the contribution.
(EuroPython sprints)
Fixes #760
Typically users will override the
App.startup()
method with one of their own. For most backends, this method must create aMainWindow
. This PR refactors the call tostartup
so that after the call, a new_verify_startup()
private method will be called which, for all the GUI backends, will enforce the condition. ForDocumentApp
app the verification is empty.Additionally, the "dummy" test backend was not properly chaining calls so
main_loop
callscreate
which callsstartup
. This was changed too to make the new feature testable.PR Checklist: