Skip to content

Idle: Improve htests #65823

Open
Open

Description

@terryjreedy
BPO 21624
Nosy @terryjreedy, @vstinner
PRs
  • bpo-21624: IDLE -- minor htest fixes #2575
  • [3.6] bpo-21624: IDLE -- minor htest fixes (GH-2575) #2578
  • Dependencies
  • bpo-22629: Idle: update htest.py and htests
  • bpo-27636: Refactor IDLE htest
  • 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 = None
    created_at = <Date 2014-06-01.04:41:10.244>
    labels = ['expert-IDLE', 'type-feature', '3.7']
    title = 'Idle: Improve htests'
    updated_at = <Date 2017-07-05.20:22:18.227>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2017-07-05.20:22:18.227>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2014-06-01.04:41:10.244>
    creator = 'terry.reedy'
    dependencies = ['22629', '27636']
    files = []
    hgrepos = []
    issue_num = 21624
    keywords = []
    message_count = 6.0
    messages = ['219486', '220074', '220238', '297691', '297694', '297700']
    nosy_count = 4.0
    nosy_names = ['terry.reedy', 'vstinner', 'jesstess', 'Saimadhav.Heblikar']
    pr_nums = ['2575', '2578']
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue21624'
    versions = ['Python 3.6', 'Python 3.7']

    Activity

    1. terryjreedy commented on Jun 1, 2014

      @terryjreedy
      MemberAuthor

      #65676 was about finishing the htest framework and creating at least a first draft of each human test. This issue is about refining individual tests. One remaining issue is placement of the master window and placement of test windows in relation to the master. The test message for some might use editing. Tests that only test behavior might be replaced by a unittest module. Some general tests, such as for Editor Window, might be split into separate tests with more specific instructions. These changes might or might not be done as part of the GSOC project.

    2. self-assigned this
      on Jun 1, 2014
    3. terryjreedy commented on Jun 9, 2014

      @terryjreedy
      MemberAuthor

      Another issue for sometests, but which might be fixed in htest.run, is to force focus to the new widget window opened by the Test_xyz button.

    4. terryjreedy commented on Jun 11, 2014

      @terryjreedy
      MemberAuthor

      Refinement 1: in doing coverage for UndoDelegator, I noticed that the htest function is counted as missing (uncovered). Both of the following in .coveragerc work to ignore the block: name prefix; comment suffix.
      def htest_.*:
      .*# htest #
      The second is more practical for alphabetical order in htest. It is also less work to change. The particular form marks it as not a normal comment.

      Refinement 2: put all imports that are specific to the htest function at the top of the function. Since the function is only called once per process, there is no efficiency consideration. I decided that after the tkinter import at the top got me (wasting time) looking through UndoDelegator for a widget call that might be the source of the leak. The changes can wait until we edit the file anyway, or at least write a test.

      However, the docstring at the top of htest.py should be changed.

    5. terryjreedy commented on Jul 4, 2017

      @terryjreedy
      MemberAuthor

      Current htest issues from this and two other issues, notes, and running htests with htest.py.

      (Default master window placement is ok. Can move.)

      h1. At least one test window overlaps the test window. Others are not centered (y-position). Fix by passing _htest and changing geometry accordingly. Use f-strings. Develop formula for centering?

      (Test messages "might use editing" is too vague. Ditto for EditorWindow 'might be split'.)

      h2. All widgets should be displayed. A couple of htests test behavior in widgets otherwise displayed, and *these* should be unittested if possible.

      h3. Force focus to opened widget window. Probably still needed.

      h4. Putting imports only needed by htest functions in the function is a good idea. Introducing a regression by mistake is not. Do this when edit after thorough tests.

      h5. # htest # is present on all current htest functions. Check that is documented, including .coveragerc entry.

      h6. What is left from #66819 after patch applied?

      h7. #71823: incapsulate common features in classes defined in htest.py.

      3 Specific TODOs in htest.py:

      h8. Improve message for dyn_option_menu.

      h9. Improve wrapper for EditorWindow.

      h10. Update GetKeysDialog test now that #65718 closed.

      h11. My note: Get keys dialog prints blank line to console, something prints 'None'. Check when run all tests.

      h12. Test window should show version and module (from __file__). Make part of #71823.

    6. changed the title [-]Idle: polish htests[/-] [+]Idle: Improve htests[/+] on Jul 4, 2017
    7. terryjreedy commented on Jul 5, 2017

      @terryjreedy
      MemberAuthor

      New changeset 2000150 by terryjreedy in branch 'master':
      bpo-21624: IDLE -- minor htest fixes (bpo-2575)
      2000150

    8. terryjreedy commented on Jul 5, 2017

      @terryjreedy
      MemberAuthor

      New changeset 1278d29 by terryjreedy in branch '3.6':
      [3.6] bpo-21624: IDLE -- minor htest fixes (GH-2575) (bpo-2578)
      1278d29

    9. transferred this issue fromon Apr 10, 2022
    10. StanFromIreland commented on Mar 3, 2025

      @StanFromIreland
      Member

      This should be merged with #71823

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    testsTests in the Lib/test dirtopic-IDLEtype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions