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

Method test_visit_depth_first

testing/_py/test_local.py:826–833  ·  view source on GitHub ↗
(self, tmpdir)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

ensureMethod · 0.80
visitMethod · 0.80
checkMethod · 0.45

Tested by

no test coverage detected