(template_path: str, tmp_path: Path)
| 56 | |
| 57 | |
| 58 | def 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( |
nothing calls this directly
no test coverage detected