mirror of
https://github.com/copier-org/copier.git
synced 2025-05-05 23:42:55 +00:00
This is redundant with pytest's native `tmp_path` fixture, so we use that one instead now.
18 lines
523 B
Python
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()
|