classification
Title: IDLE: Add tests for configdialog keys tab
Type: enhancement Stage: resolved
Components: IDLE Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: csabella, terry.reedy
Priority: normal Keywords:

Created on 2017-07-24 07:25 by terry.reedy, last changed 2017-08-15 21:50 by terry.reedy. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2996 merged csabella, 2017-08-03 22:00
PR 3092 merged terry.reedy, 2017-08-15 01:24
Messages (10)
msg299624 - (view) Author: Cheryl Sabella (csabella) * Date: 2017-08-01 17:48
I'm working on the tests for this.
msg299633 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-01 20:13
Great.  It is non-trivial, so I don't expect perfection first try.  Please revise docstring with explanation of how page works, like with Font and General pages.  I finished tests using those explanations as a guide.  They are also a guide for review.
msg299678 - (view) Author: Cheryl Sabella (csabella) * Date: 2017-08-03 00:17
I'm making good progress on this.  I should be able to open the PR tomorrow.  It's definitely non-trivial, but using your font and general tests as a guide has been invaluable.
msg299723 - (view) Author: Cheryl Sabella (csabella) * Date: 2017-08-03 22:08
I tried to minimize the changes to configdialog.  There were more I wanted to make, like reorganizing the order of the functions, but I didn't want to make the diff too crazy.  I changed some variable names because all of them had 'keys' in it and I couldn't keep track of them.  It was almost as descriptive as single letter variables!  ;-)   I think I made the new names inline with what had been done on the font and general tabs.  Again, there were more renaming changes I wanted to make (such as key_set to keyset), but I didn't want every line to be a diff.

Also, I used the name 'keyset' to refer to the section names and the keybindings to refer to the option:value pairs.  Some old vars in configdialog weren't changed to reflect this 100%, but the comment should be correct.

I did not include deactivate_current_config and activate_config__changes since those are not really specific to keys.  There are also invoked from themes and from apply.

I have notes for some of the other coding changes I'd like to make once this is in its own class.
msg300114 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-10 20:54
I am not sure I agree with all your suggested name changes.  But I am looking as more substantive issues first.
msg300124 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-10 21:54
I have thought about factoring out common test code into helper functions either within test_configdialog or in a new module.  One example: simulate a click on a listbox, with common before and after code.  Another: Testing the group of selection widgets on both theme and keys pages. (If I were not planning to replace this group, we could factor out a SelectionFrame and put an instance on each page.)

We might do some such refactoring after this, before HighPageTest.  Keep notes on redundancies you notice that might be candidates.
msg300274 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-15 01:21
New changeset 2f8964634918bdf09107c49a2d5ca62460091e54 by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
bpo-31002: IDLE: Add tests for configdialog keys tab (#2996)
https://github.com/python/cpython/commit/2f8964634918bdf09107c49a2d5ca62460091e54
msg300277 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-15 01:45
New changeset a31459008c5b3230363d155a2e8616664dc4f0c6 by Terry Jan Reedy in branch '3.6':
[3.6] bpo-31002: IDLE: Add tests for configdialog keys tab (GH-2996) (#3092)
https://github.com/python/cpython/commit/a31459008c5b3230363d155a2e8616664dc4f0c6
msg300280 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-15 01:55
Great work. Thank you.
Next: #31205, #31001, #31206, then ...
msg300311 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-15 21:50
Lines not yet covered in keys group, other than deactivate_current_config and activate_config_changes functions:

def save_new_key_set
    if not idleConf.userCfg['keys'].has_section(keyset_name):
# never false - minor issue

def delete_custom_keys
    if not item_list:
# never false hence following never executed
    else: self.customlist.SetMenu(item_list, item_list[0])
History
Date User Action Args
2017-08-15 21:50:09terry.reedysetmessages: + msg300311
2017-08-15 01:55:44terry.reedysetstatus: open -> closed
resolution: fixed
messages: + msg300280

stage: needs patch -> resolved
2017-08-15 01:45:04terry.reedysetmessages: + msg300277
2017-08-15 01:24:19terry.reedysetpull_requests: + pull_request3132
2017-08-15 01:21:48terry.reedysetmessages: + msg300274
2017-08-10 21:54:59terry.reedysetmessages: + msg300124
2017-08-10 20:54:39terry.reedysetmessages: + msg300114
2017-08-03 22:08:32csabellasetmessages: + msg299723
2017-08-03 22:00:09csabellasetpull_requests: + pull_request3032
2017-08-03 00:17:09csabellasetmessages: + msg299678
2017-08-01 20:13:32terry.reedysetmessages: + msg299633
2017-08-01 17:48:14csabellasetnosy: + csabella
messages: + msg299624
2017-07-24 08:05:37terry.reedylinkissue30780 dependencies
2017-07-24 07:25:08terry.reedycreate