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

Method visit

src/_pytest/_py/path.py:520–538  ·  src/_pytest/_py/path.py::LocalPath.visit

Yields all paths below the current one fil is a filter (glob pattern or callable), if not matching the path will not be yielded, defaulting to None (everything is returned) rec is a filter (glob pattern or callable) that controls whether a node is descended,

(self, fil=None, rec=None, ignore=NeverRaised, bf=False, sort=False)

Source from the content-addressed store, hash-verified

518 return self.new(basename=self.basename + str(other))
519
520 def visit(self, fil=None, rec=None, ignore=NeverRaised, bf=False, sort=False):
521 class="st">"""Yields all paths below the current one
522
523 fil is a filter (glob pattern or callable), if not matching the
524 path will not be yielded, defaulting to None (everything is
525 returned)
526
527 rec is a filter (glob pattern or callable) that controls whether
528 a node is descended, defaulting to None
529
530 ignore is an Exception class that is ignoredwhen calling dirlist()
531 on any of the paths (by default, all exceptions are reported)
532
533 bf if True will cause a breadthfirst search instead of the
534 default depthfirst. Default: False
535
536 sort if True will sort entries within each directory level.
537 class="st">"""
538 yield from Visitor(fil, rec, ignore, bf, sort).gen(self)
539
540 def _sortlist(self, res, sort):
541 if sort:

Callers 15

chownMethod · 0.95
copyMethod · 0.95
chmodMethod · 0.95
runMethod · 0.80
visit_AssertMethod · 0.80
visit_BoolOpMethod · 0.80
visit_UnaryOpMethod · 0.80
visit_BinOpMethod · 0.80
visit_CallMethod · 0.80
visit_StarredMethod · 0.80
visit_AttributeMethod · 0.80
visit_CompareMethod · 0.80

Calls 2

VisitorClass · 0.85
genMethod · 0.45

Tested by 13

test_visit_nofilterMethod · 0.64
test_visit_norecurseMethod · 0.64
test_visit_ignoreMethod · 0.64
test_visit_endswithMethod · 0.64
test_visit_filesonlyMethod · 0.64
test_visit_nodotfilesMethod · 0.64
test_visit_sortMethod · 0.64