MCPcopy
hub / github.com/pytest-dev/pytest / path_matches_patterns

Function path_matches_patterns

src/_pytest/python.py:210–212  ·  view source on GitHub ↗

Return whether path matches any of the patterns in the list of globs given.

(path: Path, patterns: Iterable[str])

Source from the content-addressed store, hash-verified

208
209
210def path_matches_patterns(path: Path, patterns: Iterable[str]) -> bool:
211 """Return whether path matches any of the patterns in the list of globs given."""
212 return any(fnmatch_ex(pattern, path) for pattern in patterns)
213
214
215def pytest_pycollect_makemodule(module_path: Path, parent) -> Module:

Callers 1

pytest_collect_fileFunction · 0.85

Calls 1

fnmatch_exFunction · 0.90

Tested by

no test coverage detected