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

Function test_invalid_value

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

Source from the content-addressed store, hash-verified

22
23
24def test_invalid_value(tmp_path_factory: pytest.TempPathFactory) -> None:
25 src, dst = map(tmp_path_factory.mktemp, ("src", "dst"))
26
27 build_file_tree(
28 {
29 (src / "copier.yaml"): (
30 """\
31 _envops:
32 undefined: jinja2.ChainableUndefined
33 """
34 ),
35 }
36 )
37
38 with pytest.raises(
39 ConfigFileError,
40 match="Unsupported envops.undefined value specified: jinja2.ChainableUndefined.",
41 ):
42 copier.run_copy(str(src), dst)
43
44
45def test_undefined(tmp_path_factory: pytest.TempPathFactory) -> None:

Callers

nothing calls this directly

Calls 2

build_file_treeFunction · 0.85
run_copyMethod · 0.80

Tested by

no test coverage detected