copier/tests/test_tasks.py
Jairo Llopis 823f3a1935 Remove dst fixture
This is redundant with pytest's native `tmp_path` fixture, so we use that one instead now.
2020-06-23 07:58:03 +00:00

18 lines
523 B
Python

import copier
from .helpers import DATA, render
def test_render_tasks(tmp_path):
tasks = ["touch [[ myvar ]]/1.txt", "touch [[ myvar ]]/2.txt"]
render(tmp_path, tasks=tasks)
assert (tmp_path / DATA["myvar"] / "1.txt").exists()
assert (tmp_path / DATA["myvar"] / "2.txt").exists()
def test_copy_tasks(tmp_path):
copier.copy("tests/demo_tasks", tmp_path, quiet=True)
assert (tmp_path / "hello").exists()
assert (tmp_path / "hello").is_dir()
assert (tmp_path / "hello" / "world").exists()