MCPcopy Create free account
hub / github.com/pytest-dev/pytest / path_matches_patterns

Function path_matches_patterns

src/_pytest/python.py:213–215  ·  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

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

Callers 2

pytest_collect_fileFunction · 0.85
collectMethod · 0.85

Calls 1

fnmatch_exFunction · 0.90

Tested by

no test coverage detected