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

Function fake_mkdir

testing/test_assertrewrite.py:1705–1707  ·  view source on GitHub ↗
(p, exist_ok=False, *, exc)

Source from the content-addressed store, hash-verified

1703
1704 # monkeypatch to simulate all error situations
1705 def fake_mkdir(p, exist_ok=False, *, exc):
1706 assert isinstance(p, Path)
1707 raise exc
1708
1709 monkeypatch.setattr(os, "makedirs", partial(fake_mkdir, exc=FileNotFoundError()))
1710 assert not try_makedirs(p)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected