copier/tests/test_exclude.py
2020-02-26 13:44:43 +01:00

20 lines
574 B
Python

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