{# generating python with python :3 #} import {{ module }} {% for i, test_code in enumerate(filestests, 1) %} def test_{{ i }}(): {{ test_code|indent(4, False) }} {# the code in the config file must be indented with 4 spaces only #} {% endfor %}