Skip to content
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

Closed
terryjreedy opened this issue Oct 31, 2016 · 7 comments
Closed

IDLE: add tests for config dialog. #72758

terryjreedy opened this issue Oct 31, 2016 · 7 comments
Assignees
Labels
3.7 (EOL) end of life topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 28572
Nosy @terryjreedy, @ned-deily
Files
  • config_dialog_test.diff
  • 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 2017-06-27.06:52:08.774>
    created_at = <Date 2016-10-31.21:21:59.546>
    labels = ['expert-IDLE', 'type-feature', '3.7']
    title = 'IDLE: add tests for config dialog.'
    updated_at = <Date 2017-06-27.06:52:08.772>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2017-06-27.06:52:08.772>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2017-06-27.06:52:08.774>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2016-10-31.21:21:59.546>
    creator = 'terry.reedy'
    dependencies = []
    files = ['45297']
    hgrepos = []
    issue_num = 28572
    keywords = ['patch']
    message_count = 7.0
    messages = ['279829', '279831', '279834', '280251', '280265', '280278', '297015']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'ned.deily', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue28572'
    versions = ['Python 3.6', 'Python 3.7']

    @terryjreedy
    Copy link
    Member Author

    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.

    @terryjreedy terryjreedy added the 3.7 (EOL) end of life label Oct 31, 2016
    @terryjreedy terryjreedy self-assigned this Oct 31, 2016
    @terryjreedy terryjreedy added the type-feature A feature request or enhancement label Oct 31, 2016
    @terryjreedy
    Copy link
    Member Author

    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.

    @terryjreedy
    Copy link
    Member Author

    msg279176 of bpo-27755 describe experiments with ttk.combobox.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 7, 2016

    New changeset d6440718eb30 by Terry Jan Reedy in branch '3.6':
    Issue bpo-28572: Add 10% to coverage of IDLE's test_configdialog.
    https://hg.python.org/cpython/rev/d6440718eb30

    @ned-deily
    Copy link
    Member

    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)]

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 8, 2016

    New changeset f604b6ebd802 by Terry Jan Reedy in branch '3.6':
    Issue bpo-28572: Use system-specific values for configdialog font test
    https://hg.python.org/cpython/rev/f604b6ebd802

    @terryjreedy
    Copy link
    Member Author

    The macOS issue appears to be fixed.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life topic-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants