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

Function test_copy_with_defaults

tests/test_settings.py:194–208  ·  view source on GitHub ↗
(tmp_path_factory: pytest.TempPathFactory)

Source from the content-addressed store, hash-verified

192
193
194def test_copy_with_defaults(tmp_path_factory: pytest.TempPathFactory) -> None:
195 src, dst = map(tmp_path_factory.mktemp, ("src", "dst"))
196 build_file_tree(
197 {
198 src / "copier.yml": "project_name: foo",
199 src / "result.txt.jinja": "{{ project_name }}",
200 }
201 )
202 run_copy(
203 str(src),
204 dst,
205 defaults=True,
206 settings=Settings(defaults={"project_name": "bar"}),
207 )
208 assert (dst / "result.txt").read_text() == "bar"

Callers

nothing calls this directly

Calls 3

build_file_treeFunction · 0.90
run_copyFunction · 0.90
SettingsClass · 0.90

Tested by

no test coverage detected