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

idlelib tests are silently skipped by test.regrtest on 2.7 #63687

Closed
ned-deily opened this issue Nov 4, 2013 · 4 comments
Closed

idlelib tests are silently skipped by test.regrtest on 2.7 #63687

ned-deily opened this issue Nov 4, 2013 · 4 comments
Assignees
Labels
tests Tests in the Lib/test dir topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@ned-deily
Copy link
Member

BPO 19488
Nosy @terryjreedy, @ned-deily
Files
  • test_idle_regrtest_27.patch
  • 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 2013-11-04.05:04:21.399>
    created_at = <Date 2013-11-04.04:05:16.487>
    labels = ['expert-IDLE', 'type-bug', 'tests']
    title = 'idlelib tests are silently skipped by test.regrtest on 2.7'
    updated_at = <Date 2013-11-04.08:04:31.606>
    user = 'https://github.com/ned-deily'

    bugs.python.org fields:

    activity = <Date 2013-11-04.08:04:31.606>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2013-11-04.05:04:21.399>
    closer = 'terry.reedy'
    components = ['IDLE', 'Tests']
    creation = <Date 2013-11-04.04:05:16.487>
    creator = 'ned.deily'
    dependencies = []
    files = ['32488']
    hgrepos = []
    issue_num = 19488
    keywords = ['patch']
    message_count = 4.0
    messages = ['202082', '202088', '202092', '202094']
    nosy_count = 2.0
    nosy_names = ['terry.reedy', 'ned.deily']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue19488'
    versions = ['Python 2.7']

    @ned-deily
    Copy link
    Member Author

    Running test_idle is supposed to cause the tests in Lib/idlelib/idle_test to be run. Unfortunately, under 2.7, when test.regrtest is used as the test runner, either directly or via "make test" (which buildbots use), the idlelib tests are currently silently skipped. This can be seen by running with -v and observing that nothing is run:

    python -m test.regrtest -v -uall test_idle

    The problem is that test_idle.py is depending on regrtest support of the load_tests protocol; that support was only added to regrtest in 3.3. Without changes to regrtest for 2.7, test_idle needs to define test_main as other tests do. The attached patch seems to fix the problem.

    @terryjreedy
    Copy link
    Member

    Good catch. I confirmed the non-function, the silence, and the fix.

    Ned, because the patch included a commit message, hg import immediately committed the patch with the incomplete message. This surprised me since it has never happened before. Since the patch tested out ok, the only problem is the message, but if it had not been... Please leave such messages off of posted patches.

    Since it is committed, and worked on Mac and Windows, I went ahead and pushed.

    @terryjreedy terryjreedy added the tests Tests in the Lib/test dir label Nov 4, 2013
    @terryjreedy terryjreedy self-assigned this Nov 4, 2013
    @terryjreedy terryjreedy added the type-bug An unexpected behavior, bug, or error label Nov 4, 2013
    @ned-deily
    Copy link
    Member Author

    Terry, sorry the patch was confusing. Just FYI, if you are using "hg import" particularly when reviewing patches, you should always be using "hg import --no-commit" as explained in the devguide to avoid unintended changes. Whether or not a message is included in the patch has no effect on whether it is committed. If you do commit a patch by mistake, you can use "hg backout" or, with care, "hg strip" to remove it before pushing.

    @terryjreedy
    Copy link
    Member

    As I explained on the checkins list, I am do "hg import --no-commit" indirectly though TortoiseHg Workbench Repository/import. It normally brings up an edit box for a commit message after patching and if that is left blank, it does not commit. With a message in the patch (non-comment text above 'diff'), it skips the edit box and just commits. I just verified this behavior difference with your patch on a local repository with test_idle.py. I first imported without the message, left the edit box blank, reverted, and then imported with a message added back.

    Since the patch says it is a changeset patch, I assume you committed it in and transferred it from a separate repository.

    @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
    tests Tests in the Lib/test dir topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants