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

Method fnmatch

src/_pytest/_py/path.py:412–429  ·  view source on GitHub ↗

Return true if the basename/fullname matches the glob-'pattern'. valid pattern characters:: * matches everything ? matches any single character [seq] matches any character in seq [!seq] matches any char not in seq If t

(self, pattern)

Source from the content-addressed store, hash-verified

410 self.remove()
411
412 def fnmatch(self, pattern):
413 """Return true if the basename/fullname matches the glob-'pattern'.
414
415 valid pattern characters::
416
417 * matches everything
418 ? matches any single character
419 [seq] matches any character in seq
420 [!seq] matches any char not in seq
421
422 If the pattern contains a path-separator then the full path
423 is used for pattern matching and a '*' is prepended to the
424 pattern.
425
426 if the pattern doesn't contain a path-separator the pattern
427 is only matched against the basename.
428 """
429 return FNMatcher(pattern)(self)
430
431 def relto(self, relpath):
432 """Return a string which is the relative part of the path

Callers

nothing calls this directly

Calls 1

FNMatcherClass · 0.85

Tested by

no test coverage detected