copier/tests/test_exclude.py
Jairo Llopis f2ae70a4a8
Exclude recursively
Excluding a folder and its contents didn't exclude its subfolders.

Now, excluding a folder excludes all its files and subfolders.

@Tecnativa TT20357
2020-02-24 14:03:03 +00:00

13 lines
315 B
Python

from copier.main import copy
from .helpers import PROJECT_TEMPLATE
SRC = f"{PROJECT_TEMPLATE}_exclude"
def test_recursive_exclude(tmp_path):
"""Copy is done properly when excluding recursively."""
copy(SRC, tmp_path)
assert not (tmp_path / "bad").is_dir()
assert not (tmp_path / "bad").exists()