GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — IDLE: Move unittests to test directory · Issue #95069 · python/cpython

IDLE: Move unittests to test directory #95069

New issue
Copy link
New issue
Copy link
Open
Open
IDLE: Move unittests to test directory#95069
Copy link
Assignees
terryjreedy
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-IDLEtype-featureA feature request or enhancementA feature request or enhancement

Description

@terryjreedy
terryjreedy
opened on Jul 20, 2022
Issue body actions

In particular, move unittest-related files in idlelib.idle_test to a new test/test_idle directory and split test/test_idle.py into test_idle/__init__.py and test_idle/__main__.py. This is a followup to #54781 and similar issues before and after. Note that I want idle_test and any non-unittest files (at least htest.py and part of README.txt) left as they are.

Other core developers want this for consistency, as best explained by Victor Stinner in #93839 (comment). None of those benefits apply to me, and there are costs to the change that could or would make IDLE development harder, perhaps significantly so.

The costs come from some of idlelib's special features as a package: a) it comprises about 60 modules, far more than any other stdlib package; b) the test suite is underdeveloped relative to at least some other packages, so there are (or should be) relatively more future test changes to be impacted; c) PEP 434 allows name changes and backports not allowed elsewhere in the stdlib, so there are many more of these.

  1. Search and replacement: a multifile recursive search currently displays all hits in idlelib and idlelib.idle_test with one command and puts all hits in one window. When editing any idlelib file, Alt-F3 opens IDLE's grep with idlelib as the default search directory. Having to give the command twice and having the results in two windows would be a pain. (IDLE's grep could special case recursive searches in idlelib to include test.test_idle.)

  2. Existing PRs: I would guess that there are at least 20 current PRs that modify IDLE tests. Will they all break or will old paths be automatically mapped to new paths. If they will break, I would want an automated fix (for just main) or else dispose of most of them before moving the tests.

  3. Backports: currently, code backports, which are nearly always done, are accompanied by any corresponding test changes. Victor claims in gh-95069: Move Lib/idlelib/idle_test/ to Lib/test/test_idle/ #94145 that git will always (my emphasis) map new paths in a PR to the old paths. (This would require that it keep a reverse dictionary of path changes.) I would like to see this work before I believe this.

Linked PRs

  • gh-95069: Move tests from idlelib.idle_test to test.test_idle #115444

Activity

  1. terryjreedy
    added
    type-featureA feature request or enhancementA feature request or enhancement
    topic-IDLE
    on Jul 20, 2022
  2. terryjreedy
    self-assigned this
    on Jul 20, 2022
  3. terryjreedy
    added this to IDLE Issueson Jul 23, 2022
  4. erlend-aasland
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Jul 27, 2022
  5. sobolevn
    added 4 commits that reference this issue on Feb 14, 2024

    pythongh-95069: Move tests from `idlelib.idle_test` to `test.test_idle`

    7bbdf23

    pythongh-95069: Move tests from `idlelib.idle_test` to `test.test_idle`

    ec9dc5e

    pythongh-95069: Move tests from `idlelib.idle_test` to `test.test_idle`

    f0b33ea

    pythongh-95069: Move tests from `idlelib.idle_test` to `test.test_idle`

    533dd45
  6. terryjreedy commented on Feb 15, 2024

    @terryjreedy
    terryjreedy
    on Feb 15, 2024
    MemberAuthor
    More actions

    I removed IDLE from the previous issue so it could be closed as done and so I could state my objections clearly. I believe I intended to close this after giving others a chance to comment and perhaps to give myself to think more and test a revised PR, which is not available.

  7. StanFromIreland commented on Feb 3, 2025

    @StanFromIreland
    StanFromIreland
    on Feb 3, 2025
    Member
    More actions

    This has been inactive for a good while which I would say is enough time for people to comment if they wish. Can this be closed?

  8. terryjreedy commented on Feb 4, 2025

    @terryjreedy
    terryjreedy
    on Feb 4, 2025
    MemberAuthor
    More actions

    Agree that have waited enough. I intend to commit a few bits of the PR that do not move the tests. I will try to look soon.

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

Metadata

Metadata

Assignees

  • @terryjreedy
    terryjreedy

Labels

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

Projects

  • IDLE Issues
    Status
    No status
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.