mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 23:11:44 +01:00
test: create empty dirs via tmp_dir.gen()
This commit is contained in:
@@ -55,7 +55,10 @@ class TmpDir(pathlib.Path):
|
||||
path = (prefix or self) / name
|
||||
|
||||
if isinstance(contents, dict):
|
||||
self._gen(contents, prefix=path)
|
||||
if not contents:
|
||||
makedirs(path, exist_ok=True)
|
||||
else:
|
||||
self._gen(contents, prefix=path)
|
||||
else:
|
||||
makedirs(path.parent, exist_ok=True)
|
||||
if is_py2 and isinstance(contents, str):
|
||||
|
||||
Reference in New Issue
Block a user