summaryrefslogtreecommitdiff
path: root/test/test_templite.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-10-25 13:03:44 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-10-25 13:03:44 -0400
commit94b231f7b6175a38e97ff2555a4553bfa0b58389 (patch)
tree66b25586ebd052a8e07ea21d7173d87764e4ec81 /test/test_templite.py
parent62db82f7dff57af3877f36eb08938f3f664a3687 (diff)
downloadpython-coveragepy-git-94b231f7b6175a38e97ff2555a4553bfa0b58389.tar.gz
Templite now allows comments within curly-hash markers.
Diffstat (limited to 'test/test_templite.py')
-rw-r--r--test/test_templite.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_templite.py b/test/test_templite.py
index 6102183d..4c7545bf 100644
--- a/test/test_templite.py
+++ b/test/test_templite.py
@@ -126,6 +126,16 @@ class TempliteTest(unittest.TestCase):
"123 and 123"
)
+ def test_comments(self):
+ # Single-line comments work:
+ self.try_render(
+ "Hello, {# Name goes here: #}{{name}}!",
+ {'name':'Ned'}, "Hello, Ned!")
+ # and so do multi-line comments:
+ self.try_render(
+ "Hello, {# Name\ngoes\nhere: #}{{name}}!",
+ {'name':'Ned'}, "Hello, Ned!")
+
if __name__ == '__main__':
unittest.main()