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

Function test_undefined

tests/test_jinja2_undefined.py:45–61  ·  view source on GitHub ↗
(tmp_path_factory: pytest.TempPathFactory)

Source from the content-addressed store, hash-verified

43
44
45def 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
64def test_strictundefined_undefined_variable(

Callers

nothing calls this directly

Calls 2

build_file_treeFunction · 0.85
run_copyMethod · 0.80

Tested by

no test coverage detected