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

Run some tests in a loop until failure #51561

Closed
pitrou opened this issue Nov 12, 2009 · 9 comments
Closed

Run some tests in a loop until failure #51561

pitrou opened this issue Nov 12, 2009 · 9 comments
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@pitrou
Copy link
Member

pitrou commented Nov 12, 2009

BPO 7312
Nosy @pitrou, @bitdancer
Files
  • looptests.patch
  • looptests2.patch
  • looptests3.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 = None
    closed_at = <Date 2009-11-14.16:18:50.174>
    created_at = <Date 2009-11-12.23:58:25.766>
    labels = ['type-feature', 'tests']
    title = 'Run some tests in a loop until failure'
    updated_at = <Date 2009-11-14.16:18:50.172>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2009-11-14.16:18:50.172>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-11-14.16:18:50.174>
    closer = 'r.david.murray'
    components = ['Tests']
    creation = <Date 2009-11-12.23:58:25.766>
    creator = 'pitrou'
    dependencies = []
    files = ['15317', '15325', '15328']
    hgrepos = []
    issue_num = 7312
    keywords = ['patch']
    message_count = 9.0
    messages = ['95166', '95167', '95168', '95169', '95170', '95218', '95226', '95241', '95242']
    nosy_count = 3.0
    nosy_names = ['pitrou', 'jnoller', 'r.david.murray']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue7312'
    versions = ['Python 2.7', 'Python 3.2']

    @pitrou
    Copy link
    Member Author

    pitrou commented Nov 12, 2009

    It can be useful to run one or several of the regression tests in a
    loop, until one of the tests fail. Here is a patch to do that.

    (interesting thing, by the way: you can combine it with -j, in order to
    run several instance of the test at once)

    @pitrou pitrou added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir labels Nov 12, 2009
    @jnoller
    Copy link
    Mannequin

    jnoller mannequin commented Nov 13, 2009

    +1 I wanted to do this in +1

    This is what I wanted to do in http://bugs.python.org/issue7134

    I would put this in 2.x and 3.x :)

    There was some feedback in this ML thread:
    http://mail.python.org/pipermail/python-dev/2009-June/090238.html

    @pitrou
    Copy link
    Member Author

    pitrou commented Nov 13, 2009

    This is what I wanted to do in http://bugs.python.org/issue7134

    Ah, sorry, I hadn't seen it.

    @jnoller
    Copy link
    Mannequin

    jnoller mannequin commented Nov 13, 2009

    Oh, no apologies needed. You have a patch! :)

    @bitdancer
    Copy link
    Member

    The patch generally looks good to me, but I think you overlooked line
    507, where you do a pending.clear() in case of keyboard interrupt in -j
    mode. I tested it on trunk and it seems to work great, except when I
    press ctl-C :)

    @pitrou
    Copy link
    Member Author

    pitrou commented Nov 13, 2009

    Thank you, here is an update patch.

    @bitdancer
    Copy link
    Member

    I still get:

    ValueError: No JSON object could be decoded

    in one or more of the threads when I hit ctl-c during a -j run.

    I've attached an updated patch that fixes the problem, but I'm not sure
    it is a correct fix.

    @pitrou
    Copy link
    Member Author

    pitrou commented Nov 14, 2009

    I've attached an updated patch that fixes the problem, but I'm not sure
    it is a correct fix.

    Your patch looks fine to me.

    @bitdancer
    Copy link
    Member

    Committed to trunk in r76260 and py3k in r76261.

    @bitdancer bitdancer added type-feature A feature request or enhancement and removed type-bug An unexpected behavior, bug, or error labels Nov 14, 2009
    @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 type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants