copier/tests/test_cli.py
Jairo Llopis 5b48f352a4 Fix new checks
- Add ignore comment on `BaseModel` instances that are correctly following what `pydantic` wants, to let flake8-bugbear be happy.
- Remove unused import.
2019-12-10 11:52:05 +00:00

15 lines
403 B
Python

from pathlib import Path
from copier.cli import CopierApp
SIMPLE_DEMO_PATH = Path(__file__).parent / "demo_simple"
def test_good_cli_run(dst):
run_result = CopierApp.run(["--quiet", str(SIMPLE_DEMO_PATH), str(dst)], exit=False)
a_txt = dst / "a.txt"
assert run_result[1] == 0
assert a_txt.exists()
assert a_txt.is_file()
assert a_txt.read_text().strip() == "EXAMPLE_CONTENT"