sphinx/tests/test_util/test_util.py

15 lines
307 B
Python
Raw Normal View History

2022-02-19 21:05:56 -06:00
"""Tests util functions."""
from __future__ import annotations
2024-07-22 20:38:45 -05:00
from sphinx.util.osutil import ensuredir
2024-10-25 16:41:08 -05:00
def test_ensuredir(tmp_path):
# Does not raise an exception for an existing directory.
ensuredir(tmp_path)
2024-10-25 16:41:08 -05:00
path = tmp_path / 'a' / 'b' / 'c'
ensuredir(path)
assert path.is_dir()