Visitar URL original
Improve test coverage for fnmatch.filter and fnmatch.filterfalse by Bolotnyj · Pull Request #161904 · python/cpython · GitHub
Skip to content

Improve test coverage for fnmatch.filter and fnmatch.filterfalse - #161904

Open
Bolotnyj wants to merge 1 commit into
python:mainfrom
Bolotnyj:feature/fnmatch-coverage
Open

Bolotnyj wants to merge 1 commit into
python:mainfrom
Bolotnyj:feature/fnmatch-coverage

Conversation

@Bolotnyj

Copy link
Copy Markdown

Increased test coverage for Lib/fnmatch.py from 89% to 91%, covering all remaining executable logic branches (partial branches reduced from 2 to 0; the remaining uncovered lines are strictly module-level imports and definitions).

Added tests:

  • FilterTestCase.test_posixpath: tests fnmatch.filter() on the os.path is posixpath branch, verifying that non-matching items (case-sensitive on POSIX) are properly skipped in the loop for both str and bytes.
  • FilterFalseTestCase.test_posixpath: tests fnmatch.filterfalse() on the os.path is posixpath branch (itertools.filterfalse) for both str and bytes.

@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Nov 12, 2026
@bedevere-app

bedevere-app Bot commented Nov 12, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

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

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant