add test
This commit is contained in:
parent
3c8dc83d21
commit
8f2e935574
|
@ -1972,6 +1972,11 @@ def test_try_makedirs(monkeypatch, tmp_path: Path) -> None:
|
||||||
monkeypatch.setattr(os, "makedirs", partial(fake_mkdir, exc=err))
|
monkeypatch.setattr(os, "makedirs", partial(fake_mkdir, exc=err))
|
||||||
assert not try_makedirs(p)
|
assert not try_makedirs(p)
|
||||||
|
|
||||||
|
err = OSError()
|
||||||
|
err.errno = errno.ENOSYS
|
||||||
|
monkeypatch.setattr(os, "makedirs", partial(fake_mkdir, exc=err))
|
||||||
|
assert not try_makedirs(p)
|
||||||
|
|
||||||
# unhandled OSError should raise
|
# unhandled OSError should raise
|
||||||
err = OSError()
|
err = OSError()
|
||||||
err.errno = errno.ECHILD
|
err.errno = errno.ECHILD
|
||||||
|
|
Loading…
Reference in New Issue