Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

regrtest: allow to intermix --match and --ignore options #110918

Closed
Labels
3.11only security fixes3.12only security fixes3.13bugs and security fixestestsTests in the Lib/test dirtype-featureA feature request or enhancement
@serhiy-storchaka

Description

@serhiy-storchaka

Feature or enhancement

Currently you can use--match and--ignore options for positive and negative filtering of test cases by name. But negative patterns always win. So you can select a class of tests and then exclude some tests from it, but you cannot exclude a class of tests except some tests.

Many programs that have similar options (can also be named--include/--exclude) use different algorithm. They apply rules in the order, and the last rule wins. I propose to implement this in Python regrtests too. Examples:

RunFileTests tests intest_os, excludingtest_write:

./python -m test test_os -m FileTests -i test_write

Run all tests intest_os, excludingFileTests tests, but includingtest_write:

./python -m test test_os -i FileTests -m test_write

And, of course, any combinations are valid. This applies also to options that read patterns from files:--matchfile and--ignorefile. The implementation is actually somewhat simpler than the current one.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixes3.12only security fixes3.13bugs and security fixestestsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp