Skip to content

Fix and document idlelib/idle_test/template.py #78098

Closed

Description

@doko42
BPO 33917
Nosy @terryjreedy, @doko42, @taleinat, @ned-deily, @csabella, @miss-islington
PRs
  • bpo-33917: Fix and document idlelib/idle_test/template.py #7830
  • [3.7] bpo-33917: Fix and document idlelib/idle_test/template.py (GH-7830) #7831
  • [3.6] bpo-33917: Fix and document idlelib/idle_test/template.py (GH-7830) #7832
  • 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 2018-06-20.21:59:44.402>
    created_at = <Date 2018-06-20.16:54:43.594>
    labels = ['3.8', 'expert-IDLE', 'type-bug', '3.7']
    title = 'Fix and document idlelib/idle_test/template.py'
    updated_at = <Date 2018-06-27.00:12:17.211>
    user = 'https://github.com/doko42'

    bugs.python.org fields:

    activity = <Date 2018-06-27.00:12:17.211>
    actor = 'ned.deily'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2018-06-20.21:59:44.402>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2018-06-20.16:54:43.594>
    creator = 'doko'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33917
    keywords = ['3.6regression', '3.7regression']
    message_count = 7.0
    messages = ['320099', '320103', '320112', '320114', '320117', '320119', '320527']
    nosy_count = 6.0
    nosy_names = ['terry.reedy', 'doko', 'taleinat', 'ned.deily', 'cheryl.sabella', 'miss-islington']
    pr_nums = ['7830', '7831', '7832']
    priority = None
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue33917'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    Activity

    1. doko42 commented on Jun 20, 2018

      @doko42
      MemberAuthor

      Seen with the 3.6 branch and the 3.7 branch at least. This file is installed by default, so should be valid syntax? If it's supposed to be that way, maybe call the template like template.py.in?

      Unpacking libpython3.6-testsuite (3.6.6~rc1-3) ...
      Setting up libpython3.6-testsuite (3.6.6~rc1-3) ...
      File "/usr/lib/python3.6/idlelib/idle_test/template.py", line 3
      from idlelib import
      ^
      SyntaxError: invalid syntax

    2. terryjreedy commented on Jun 20, 2018

      @terryjreedy
      Member

      I wrote it intentionally the way it is, for bpo-33855, as it made it maximally easily to use to complete the test suite. Since it caused a problem, I added a valid dummy name to be replaced, and fixed the other syntax error. The file now compiles, runs, and tests OK. New IDLE modules needing a new test file should be rare.

      I will submit the PR after I edit the readme to document the usage of the template.

    3. changed the title [-]idlelib/idle_test/template.py has invalid syntax[/-] [+]Fix and document idlelib/idle_test/template.py[/+] on Jun 20, 2018
    4. terryjreedy commented on Jun 20, 2018

      @terryjreedy
      Member

      Tal and Cheryl: I revised the template for IDLE tests, pulled it out of README.txt into template.py, and explained it in the readme. It has new code for cleaning up after instantiating EditorWindow in tests. Please follow for any new test file, including test_tooltip and test_squeezer. (They should both be pretty close already.)

    5. terryjreedy commented on Jun 20, 2018

      @terryjreedy
      Member

      New changeset 87a9273 by Terry Jan Reedy in branch 'master':
      bpo-33917: Fix and document idlelib/idle_test/template.py (GH-7830)
      87a9273

    6. miss-islington commented on Jun 20, 2018

      @miss-islington
      Contributor

      New changeset a717c56 by Miss Islington (bot) in branch '3.7':
      bpo-33917: Fix and document idlelib/idle_test/template.py (GH-7830)
      a717c56

    7. miss-islington commented on Jun 20, 2018

      @miss-islington
      Contributor

      New changeset 7c853d0 by Miss Islington (bot) in branch '3.6':
      bpo-33917: Fix and document idlelib/idle_test/template.py (GH-7830)
      7c853d0

    8. ned-deily commented on Jun 27, 2018

      @ned-deily
      Member

      FTR, the problem change was merged/backported after 3.7.0rc1 and 3.6.6rc1 so doko must have been working from a development branch and not a release tag. The original and its fix will first be officially released in 3.7.1 and 3.6.7 so there's really no need for a correction NEWS entry; it doesn't hurt either.

    9. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions