Adapt test_exclude_recursive_negate

This commit is contained in:
Ben Felder 2020-02-26 13:57:38 +01:00
parent 51db236ad8
commit a1455c975a
No known key found for this signature in database
GPG Key ID: 47E17F94645FA481
5 changed files with 6 additions and 6 deletions

View File

@ -1 +0,0 @@
This file must not exist in copy.

View File

@ -1,3 +1,3 @@
_exclude:
- bad
- "!bad/good"
- "*.txt"
- "!copy_me.txt"

View File

View File

@ -12,8 +12,9 @@ def test_exclude_recursive(tmp_path):
def test_exclude_recursive_negate(tmp_path):
"""Copy is done properly when excluding recursively."""
"""Copy is done properly when exclude is negated for copy_me.txt."""
src = f"{PROJECT_TEMPLATE}_exclude_negate"
copy(src, tmp_path)
assert (tmp_path / "bad").exists()
assert (tmp_path / "bad").is_dir()
assert (tmp_path / "copy_me.txt").exists()
assert (tmp_path / "copy_me.txt").is_file()
assert not (tmp_path / "do_not_copy_me.txt").exists()