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
IDLE: configdialog - add tests for ConfigDialog GUI. #74963
Comments
A complete test of the GUI will simulate user interaction with every widget and then query Changes() to see that the proper changes orders have been recorded. This issue depends on bpo-30779, factor out Changes class. |
Tests should be tested on MacOS before being pushed. A possible issue is including constants that are different on different systems. See bpo-28572 |
I'm trying to add the test on configdialog, currently working on KeysTest. |
Proceed as you want. Keep in mind that the interface to the changes structure will be changed by bpo-30779. The testing logic should not be, however. |
PR to fix type in moduleTearDown. |
I posted PR 2612 for bpo-30779 and expect to merge it tomorrow after sleep and final review. It includes passing revisions of existing configdialog tests. A PR dependent on 2612 could be posted before I do the merge. Follow the model of using xyzpage names in asserts and tests would survive the refactoring of ConfigChanges discussed as a possibility on bpo-30779. I want to move forward on this, but not duplicate your work, so please post work done and immediate plans. |
This issue is almost done. There are just a few things missed by the closed dependencies. |
I've started working on the missing tests for HighPage and KeysPage and also test for the functions and buttons in ConfigDialog. That led to PR3238 because the 'help' button wasn't working. Anyway, I found the following on http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm: "An easier solution is to prevent Tkinter from propagating the event to other handlers; just return the string “break” from your event handler: def ignore(event):
return "break"
text.bind("<Return>", ignore)
or text.bind("<Return>", lambda e: "break")" So, it seems that the 'Double-Button-1' and 'B1-Motion' bindings are to prevent those events from propagating outside of the widget. Although, I didn't notice a difference when I commented them out, so maybe they don't have a higher level binding. |
I just pushed the extension conversion patch. The tests we did already were greatly helpful, and some tests not done or inadequate hindered. I am now looking to polish configdialog before 3.6.3. If you have anything worth a new issue and PR, I will be ready to review. |
Sorry I don't have any tests yet. I've added a few, but it's taking me forever to figure out the bindings for testing the |
I've submitted a PR for the tests that I added to complete coverage for Keys and Highlights and to add some GUI tests for the buttons. It's not everything that I wanted to do, but it ended up being more substantial than I realized. Here's the issue I was having with testing This was OK for the testing on I played with it in IDLE and I could reset the Press by doing an event-generate on a different (x, y), but that didn't work in the test. I tried a delay and it still didn't fix it. Anyway, I've learned a lot about mouse binding while working on this, but without a solution, I cheated and just did ButtonPress on a different (x, y) for the second test. Sorry about the rambling, but I'd love to know the trick to resetting the number of button presses in a test. |
Review of overview: PR-3592 completes highlights and keys coverage and needs my review after getting lost in the flurry of PRs. Dependency bpo-31414 has merged PRs. I should review, close, or indicate what is left to do. Other dependencies are closed and I believe this should be after handling above 2 items. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: