MCPcopy
hub / github.com/copier-org/copier / test_good_cli_run

Function test_good_cli_run

tests/test_cli.py:58–77  ·  view source on GitHub ↗
(template_path: str, tmp_path: Path)

Source from the content-addressed store, hash-verified

56
57
58def test_good_cli_run(template_path: str, tmp_path: Path) -> None:
59 run_result = CopierApp.run(
60 [
61 "copier",
62 "copy",
63 "--quiet",
64 "-a",
65 "altered-answers.yml",
66 template_path,
67 str(tmp_path),
68 ],
69 exit=False,
70 )
71 a_txt = tmp_path / "a.txt"
72 assert run_result[1] == 0
73 assert a_txt.exists()
74 assert a_txt.is_file()
75 assert a_txt.read_text() == "EXAMPLE_CONTENT"
76 answers = load_answersfile_data(tmp_path, "altered-answers.yml")
77 assert answers["_src_path"] == template_path
78
79
80@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

load_answersfile_dataFunction · 0.90

Tested by

no test coverage detected