def test_template_complex():
 schema = vol.Schema(cv.template_complex)
 for value in (None, '{{ partial_print }', '{% if True %}Hello'):
  with pytest.raises(vol.MultipleInvalid):
   schema(value)
 options = (1, 'Hello', '{{ beer }}', '{% if 1 == 1 %}Hello{% else %}World{% endif %}', {'test': 1, 'test2': '{{ beer }}'}, ['{{ beer }}', 1])
 for value in options:
  schema(value)

def test_template_complex ( ) : schema = vol . Schema ( cv . template_complex ) for value in ( None , '{{ partial_print }' , '{% if True %}Hello' ) : with pytest . raises ( vol . MultipleInvalid ) : schema ( value ) options = ( 1 , 'Hello' , '{{ beer }}' , '{% if 1 == 1 %}Hello{% else %}World{% endif %}' , { 'test' : 1 , 'test2' : '{{ beer }}' } , [ '{{ beer }}' , 1 ] ) for value in options : schema ( value )
test template_complex validator .