(tmp_path_factory: pytest.TempPathFactory)
| 192 | |
| 193 | |
| 194 | def 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" |
nothing calls this directly
no test coverage detected