(
tmp_path_factory: pytest.TempPathFactory,
)
| 62 | |
| 63 | |
| 64 | def test_strictundefined_undefined_variable( |
| 65 | tmp_path_factory: pytest.TempPathFactory, |
| 66 | ) -> None: |
| 67 | src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) |
| 68 | |
| 69 | build_file_tree( |
| 70 | { |
| 71 | (src / "copier.yaml"): ( |
| 72 | """\ |
| 73 | _envops: |
| 74 | undefined: jinja2.StrictUndefined |
| 75 | """ |
| 76 | ), |
| 77 | (src / "test.jinja"): "{{ undefined_variable }}", |
| 78 | } |
| 79 | ) |
| 80 | |
| 81 | with pytest.raises(UndefinedError, match="'undefined_variable' is undefined"): |
| 82 | copier.run_copy(str(src), dst) |
nothing calls this directly
no test coverage detected