MCPcopy
hub / github.com/treeverse/dvc / _cleanup_dir

Function _cleanup_dir

dvc/testing/benchmarks/cli/commands/test_init.py:5–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4def test_init(bench_dvc, tmp_dir, scm):
5 def _cleanup_dir():
6 for item in tmp_dir.iterdir():
7 if item.is_dir():
8 if item.name != ".git":
9 shutil.rmtree(item)
10 else:
11 item.unlink()
12
13 bench_dvc("init", setup=_cleanup_dir, rounds=100, warmup_rounds=1)

Callers

nothing calls this directly

Calls 2

is_dirMethod · 0.80
unlinkMethod · 0.80

Tested by

no test coverage detected