MCPcopy
hub / github.com/tornadoweb/tornado / test_expressions

Method test_expressions

tornado/test/template_test.py:21–23  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19 self.assertEqual(template.generate(name=utf8("Ben")), b"Hello Ben!")
20
21 def test_expressions(self):
22 template = Template("2 + 2 = {{ 2 + 2 }}")
23 self.assertEqual(template.generate(), b"2 + 2 = 4")
24
25 def test_comment(self):
26 template = Template("Hello{# TODO i18n #} {{ name }}!")

Callers

nothing calls this directly

Calls 2

generateMethod · 0.95
TemplateClass · 0.90

Tested by

no test coverage detected