homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE: add tests for config dialog.
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: ned.deily, python-dev, terry.reedy
Priority: normal Keywords: patch

Created on 2016年10月31日 21:21 by terry.reedy, last changed 2022年04月11日 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
config_dialog_test.diff terry.reedy, 2016年10月31日 21:21 review
Messages (7)
msg279829 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016年10月31日 21:21
The current test_configdialog creates an instance of ConfigDialog. Time to add some real tests so I can comfortably work on multiple other configdialog issues.
 The challenge is to do it so tests run without a blocking mainloop call and without IDLE's tcl update calls. Explicit root.update call can be added if needed. I also want to test without making the dialog visible. This is a problem for at least some event_generate calls, but their seem to be (mostly) better options. Buttons and Radiobuttons for both tk and ttk have an invoke method that works fine. Entry widget insert seems to work also to trigger that test action.
Attached are partial tests for two of the four main tabs.
msg279831 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016年10月31日 21:27
Patch makes two types of change to configdialog. 1. Make tested widgets visible to their methods can be called. 2. Delete an erroneous command argument for General tab radiobutton. Calling SetKeysType on the General tab just redid adjustments on the Keys tab that were already done.
msg279834 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016年10月31日 21:47
msg279176 of #27755 describe experiments with ttk.combobox.
msg280251 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016年11月07日 22:15
New changeset d6440718eb30 by Terry Jan Reedy in branch '3.6':
Issue #28572: Add 10% to coverage of IDLE's test_configdialog.
https://hg.python.org/cpython/rev/d6440718eb30 
msg280265 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2016年11月08日 00:09
test_idle now fails (macOS 10.12, Tcl/Tk 8.6):
test test_idle failed -- Traceback (most recent call last):
 File "./lib/python3.7/idlelib/idle_test/test_configdialog.py", line 62, in test_font
 self.assertEqual(changes, expected)
AssertionError: Lists differ: [('ma[70 chars]ont-size', '11'), ('main', 'EditorWindow', 'font-bold', False)] != [('ma[70 chars]ont-size', '10'), ('main', 'EditorWindow', 'font-bold', False)]
First differing element 1:
('main', 'EditorWindow', 'font-size', '11')
('main', 'EditorWindow', 'font-size', '10')
 [('main', 'EditorWindow', 'font', 'Test Font'),
- ('main', 'EditorWindow', 'font-size', '11'),
? ^
+ ('main', 'EditorWindow', 'font-size', '10'),
? ^
 ('main', 'EditorWindow', 'font-bold', False)]
msg280278 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016年11月08日 04:15
New changeset f604b6ebd802 by Terry Jan Reedy in branch '3.6':
Issue #28572: Use system-specific values for configdialog font test
https://hg.python.org/cpython/rev/f604b6ebd802 
msg297015 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017年06月27日 06:52
The macOS issue appears to be fixed.
History
Date User Action Args
2022年04月11日 14:58:38adminsetgithub: 72758
2017年06月27日 06:52:08terry.reedysetstatus: open -> closed
resolution: fixed
messages: + msg297015

stage: needs patch -> resolved
2017年06月19日 18:32:43terry.reedysetcomponents: + IDLE
2016年11月08日 04:15:27python-devsetmessages: + msg280278
2016年11月08日 00:09:21ned.deilysetnosy: + ned.deily
messages: + msg280265
2016年11月07日 22:15:33python-devsetnosy: + python-dev
messages: + msg280251
2016年10月31日 21:47:43terry.reedysetmessages: + msg279834
2016年10月31日 21:27:00terry.reedysetmessages: + msg279831
2016年10月31日 21:21:59terry.reedycreate

AltStyle によって変換されたページ (->オリジナル) /