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

Function test_visit_ignores_errors

testing/test_pathlib.py:422–429  ·  view source on GitHub ↗
(tmp_path: Path)

Source from the content-addressed store, hash-verified

420
421
422def test_visit_ignores_errors(tmp_path: Path) -> None:
423 symlink_or_skip("recursive", tmp_path / "recursive")
424 tmp_path.joinpath("foo").write_bytes(b"")
425 tmp_path.joinpath("bar").write_bytes(b"")
426
427 assert [
428 entry.name for entry in visit(str(tmp_path), recurse=lambda entry: False)
429 ] == ["bar", "foo"]
430
431
432@pytest.mark.skipif(not sys.platform.startswith("win"), reason="Windows only")

Callers

nothing calls this directly

Calls 2

symlink_or_skipFunction · 0.90
visitFunction · 0.90

Tested by

no test coverage detected