(tmp_path_factory: pytest.TempPathFactory)
| 43 | |
| 44 | |
| 45 | def test_undefined(tmp_path_factory: pytest.TempPathFactory) -> None: |
| 46 | src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) |
| 47 | |
| 48 | build_file_tree( |
| 49 | { |
| 50 | (src / "copier.yaml"): ( |
| 51 | """\ |
| 52 | _envops: |
| 53 | undefined: jinja2.Undefined |
| 54 | """ |
| 55 | ), |
| 56 | (src / "test.jinja"): "{{ undefined_variable }}", |
| 57 | } |
| 58 | ) |
| 59 | |
| 60 | copier.run_copy(str(src), dst) |
| 61 | assert (dst / "test").read_text() == "" |
| 62 | |
| 63 | |
| 64 | def test_strictundefined_undefined_variable( |
nothing calls this directly
no test coverage detected