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: add tests for config dialog. #72758
Comments
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. |
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. |
New changeset d6440718eb30 by Terry Jan Reedy in branch '3.6': |
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', 'Test Font'),
+ ('main', 'EditorWindow', 'font-size', '10'), ('main', 'EditorWindow', 'font-bold', False)] |
New changeset f604b6ebd802 by Terry Jan Reedy in branch '3.6': |
The macOS issue appears to be fixed. |
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: