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

regrtest: add --matchfile option #74725

Closed
vstinner opened this issue Jun 1, 2017 · 8 comments
Closed

regrtest: add --matchfile option #74725

vstinner opened this issue Jun 1, 2017 · 8 comments
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@vstinner
Copy link
Member

vstinner commented Jun 1, 2017

BPO 30540
Nosy @vstinner, @vadmium, @serhiy-storchaka
PRs
  • bpo-30540: regrtest: add --matchfile option #1909
  • [3.6] Synchronize libregrtest from master to 3.6 #2244
  • [2.7] bpo-30540, bpo-30523: Add --matchfile and --list-cases options to regrtest #2249
  • [3.5] bpo-30540, bpo-30523: Add --matchfile and --list-cases options to regrtest #2250
  • 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 2017-06-09.08:21:09.627>
    created_at = <Date 2017-06-01.19:39:14.483>
    labels = ['3.7', 'type-feature', 'tests']
    title = 'regrtest: add --matchfile option'
    updated_at = <Date 2017-07-18.17:52:29.518>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-07-18.17:52:29.518>
    actor = 'steve.dower'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-06-09.08:21:09.627>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2017-06-01.19:39:14.483>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30540
    keywords = []
    message_count = 8.0
    messages = ['294959', '294960', '295082', '295496', '295497', '296188', '296202', '296209']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'martin.panter', 'serhiy.storchaka']
    pr_nums = ['1909', '2244', '2249', '2250']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue30540'
    versions = ['Python 3.7']

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 1, 2017

    Attached pull request adds the --matchfile option to regrtest.

    • Add a new option taking a filename to get a list of test names to filter tests.
    • support.match_tests becomes a list.
    • Modify run_unittest() to accept to match the whole test identifier, not just a part of a test identifier.

    For example, the following command only runs test_default_timeout() of the BarrierTests class of test_threading:

    $ ./python -m test -v test_threading -m test.test_threading.BarrierTests.test_default_timeout

    @vstinner vstinner added 3.7 (EOL) end of life tests Tests in the Lib/test dir type-feature A feature request or enhancement labels Jun 1, 2017
    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 1, 2017

    This issue is the last part to implement the issue bpo-29512: "regrtest refleak: implement bisection feature".

    See also the second part, bpo-30523: unittest: add --list-tests option to only display the list of test names, don't run tests.

    @serhiy-storchaka
    Copy link
    Member

    I less need reading test names from a file than other changes in this file. :)

    But what about doctests? They are run unconditionally.

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 9, 2017

    New changeset ef8320c by Victor Stinner in branch 'master':
    bpo-30540: regrtest: add --matchfile option (bpo-1909)
    ef8320c

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 9, 2017

    But what about doctests? They are run unconditionally.

    Sorry, I don't know how to handle them. I only tried to make a small enhancement for my "bisect" usecase. If you see a way to handle them, don't hesitate to propose a patch!

    I would prefer to have time to play with the new feature before backporting it to stable branches. If someone needs this feature right now in stable branches, speak up and maybe also reopen the issue ;-)

    My change was merged (with unit tests!), so I close the issue.

    @vstinner vstinner closed this as completed Jun 9, 2017
    @vstinner
    Copy link
    Member Author

    New changeset a0ccc54 by Victor Stinner in branch '3.6':
    Synchronize libregrtest from master to 3.6 (bpo-2244)
    a0ccc54

    @vstinner
    Copy link
    Member Author

    New changeset 24c2c20 by Victor Stinner in branch '2.7':
    bpo-30540, bpo-30523: Add --matchfile and --list-cases options to regrtest (bpo-2249)
    24c2c20

    @vstinner
    Copy link
    Member Author

    New changeset 46e299c by Victor Stinner in branch '3.5':
    [3.5] bpo-30540, bpo-30523: Add --matchfile and --list-cases options to regrtest (bpo-2250)
    46e299c

    @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
    3.7 (EOL) end of life 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