Macros can only be used once in a single cfood element
The following will not work (see xfailing test unittests/test_macros.py::test_use_macro_twice
)
---
metadata:
macros:
- !defmacro
name: test_twice
params:
macro_name: default_name
a: 4
definition:
$macro_name:
something:
a: $a
---
extroot: !macro
test_twice:
macro_name: once
test_twice:
macro_name: twice
a: 5
test_twice:
I.e., cfood["extroot"]
will only contain one element with name default_name
.