blob: 10665e96f4ce1b9767c4612c31e9e4f61556e003 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from __future__ import annotations
from pathlib import Path
from tox.util.path import ensure_empty_dir
def test_ensure_empty_dir_file(tmp_path: Path) -> None:
dest = tmp_path / "a"
dest.write_text("")
ensure_empty_dir(dest)
assert dest.is_dir()
assert not list(dest.iterdir())
|