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

Function test_visit_ignores_errors

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

Source from the content-addressed store, hash-verified

539
540
541def test_visit_ignores_errors(tmp_path: Path) -> None:
542 symlink_or_skip("recursive", tmp_path / "recursive")
543 tmp_path.joinpath("foo").write_bytes(b"")
544 tmp_path.joinpath("bar").write_bytes(b"")
545
546 assert [
547 entry.name for entry in visit(str(tmp_path), recurse=lambda entry: False)
548 ] == ["bar", "foo"]
549
550
551@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