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

Method test_visit_depth_first

testing/_py/test_local.py:826–833  ·  testing/_py/test_local.py::TestLocalPath.test_visit_depth_first
(self, tmpdir)

Source from the content-addressed store, hash-verified

824 assert l2.read_text(encoding=class="st">"utf-8") == class="st">"foo"
825
826 def test_visit_depth_first(self, tmpdir):
827 tmpdir.ensure(class="st">"a", class="st">"1")
828 tmpdir.ensure(class="st">"b", class="st">"2")
829 p3 = tmpdir.ensure(class="st">"breadth")
830 lst = list(tmpdir.visit(lambda x: x.check(file=1)))
831 assert len(lst) == 3
832 class="cm"># check that breadth comes last
833 assert lst[2] == p3
834
835 def test_visit_rec_fnmatch(self, tmpdir):
836 p1 = tmpdir.ensure(class="st">"a", class="st">"123")

Callers

nothing calls this directly

Calls 3

ensureMethod · 0.80
visitMethod · 0.80
checkMethod · 0.45

Tested by

no test coverage detected