Repository navigation
Closed
Labels
3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifetopic-IDLEtype-featureA feature request or enhancementA feature request or enhancement
Description
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:
assignee = 'https://github.com/terryjreedy'
closed_at = <Date 2020-01-27.23:38:45.436>
created_at = <Date 2017-06-26.22:38:31.231>
labels = ['3.8', 'expert-IDLE', 'type-feature', '3.7', '3.9']
title = 'IDLE: configdialog - add tests for ConfigDialog GUI.'
updated_at = <Date 2020-01-27.23:38:45.434>
user = 'https://github.com/terryjreedy'bugs.python.org fields:
activity = <Date 2020-01-27.23:38:45.434>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = True
closed_date = <Date 2020-01-27.23:38:45.436>
closer = 'terry.reedy'
components = ['IDLE']
creation = <Date 2017-06-26.22:38:31.231>
creator = 'terry.reedy'
dependencies = ['30779', '30870', '30981', '30993', '31001', '31002', '31003', '31287', '31414']
files = []
hgrepos = []
issue_num = 30780
keywords = ['patch']
message_count = 18.0
messages = ['296963', '297016', '297247', '297250', '297838', '297852', '297853', '297855', '300906', '300922', '301037', '301849', '302171', '302225', '307206', '360810', '360815', '360816']
nosy_count = 4.0
nosy_names = ['terry.reedy', 'louielu', 'cheryl.sabella', 'miss-islington']
pr_nums = ['2606', '2613', '2046', '3222', '3238', '3592', '18218', '18219']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue30780'
versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']Metadata
Metadata
Assignees
Labels
3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifetopic-IDLEtype-featureA feature request or enhancementA feature request or enhancement
Activity
terryjreedy commentedon Jun 26, 2017
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.
terryjreedy commentedon Jun 27, 2017
Tests should be tested on MacOS before being pushed. A possible issue is including constants that are different on different systems. See bpo-28572
mlouielu commentedon Jun 29, 2017
I'm trying to add the test on configdialog, currently working on KeysTest.
terryjreedy commentedon Jun 29, 2017
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.
terryjreedy commentedon Jul 6, 2017
PR to fix type in moduleTearDown.
terryjreedy commentedon Jul 7, 2017
New changeset 25a4206 by terryjreedy in branch 'master':
bpo-30780: Fix error in idlelib.test_idle.test_configdialog (bpo-2606)
25a4206
terryjreedy commentedon Jul 7, 2017
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.
terryjreedy commentedon Jul 7, 2017
New changeset df0f993 by terryjreedy in branch '3.6':
[3.6] bpo-30780: Fix error in idlelib.test_idle.test_configdialog (GH-2606) (bpo-2613)
df0f993
terryjreedy commentedon Aug 26, 2017
This issue is almost done. There are just a few things missed by the closed dependencies.
terryjreedy commentedon Aug 27, 2017
bpo-31001 and bpo-31002 have notes on what not tested in HighPage and KeysPage.
csabella commentedon Aug 30, 2017
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:
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.
terryjreedy commentedon Sep 11, 2017
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.
csabella commentedon Sep 14, 2017
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
Double-Button-1andB1-Motion. I actually have a test forDouble-Button-1now, but still working onB1-Motion.csabella commentedon Sep 14, 2017
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
Double-Button-1andB1-Motion. After the first ButtonPress and ButtonRelease, the second (or later) event-generate always looked like it was a double click (it probably was really a triple click or higher, depending how many times I tried it). I tried everything I could think of or find online, but I couldn't find how to reset the counts to start over and make it think it was a justButtonPressand not aDouble-Button.This was OK for the testing on
Double-Button, but it was causing theB1-Motionnot to work because it was not seeing each 'movement' as a press/move/release, but rather a double-button/move/release. It was OK because the Double also invokes the Press callback, however, since the Double event was bound tobreak, it didn't allow the text to be selected. (The difference betweenDoubleandB1-Motionis that Double selects a word and B1-Motion selects where the mouse moves).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.
terryjreedy commentedon Nov 29, 2017
Review of overview:
PR-2706 and PR-2613 fixed one line in test_configdialog for this issue.
PR-2046, bpo-30617 and PR-3238, bpo-30781 are merged cross-references.
PR-3222 was closed in favor of PR-3220, bpo-31287, merged.
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.
terryjreedy commentedon Jan 27, 2020
New changeset dd023ad by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
bpo-30780: Add IDLE configdialog tests (bpo-3592)
dd023ad
miss-islington commentedon Jan 27, 2020
New changeset 5aefee6 by Miss Islington (bot) in branch '3.7':
bpo-30780: Add IDLE configdialog tests (GH-3592)
5aefee6
miss-islington commentedon Jan 27, 2020
New changeset 7b57b15 by Miss Islington (bot) in branch '3.8':
bpo-30780: Add IDLE configdialog tests (GH-3592)
7b57b15