Edgewall Software

Ticket #594: genshi-594-undefined-function-variable.patch

File genshi-594-undefined-function-variable.patch, 787 bytes (added by fschwarz, 9 years ago)

test case

  • genshi/template/tests/directives.py

     
    406406          </div>
    407407        </doc>""", tmpl.generate().render(encoding=None))
    408408
     409    def test_function_return_value_in_tuple(self):
     410        tmpl = MarkupTemplate("""<doc xmlns:py="http://genshi.edgewall.org/">
     411          <py:def function="foo(name)">__${name}__</py:def>
     412          ${tuple(foo('bar'))}
     413        </doc>""")
     414        self.assertEqual("""<doc>
     415          __bar__
     416        </doc>""", tmpl.generate().render(encoding=None))
    409417
     418
    410419class ForDirectiveTestCase(unittest.TestCase):
    411420    """Tests for the `py:for` template directive."""
    412421