summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2013-10-27 18:34:06 -0400
committerNed Batchelder <ned@nedbatchelder.com>2013-10-27 18:34:06 -0400
commit11a5e7225f009cab6329be456793fba4b06caab8 (patch)
tree953b9d324ced2fcb2ab217a743e71bdce46b2bbf /tests
parente036fd59592273fd05f468c7da106515910d9147 (diff)
downloadpython-coveragepy-11a5e7225f009cab6329be456793fba4b06caab8.tar.gz
More tests of Templite's sad-path behavior.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_templite.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_templite.py b/tests/test_templite.py
index e3918e4..7326d24 100644
--- a/tests/test_templite.py
+++ b/tests/test_templite.py
@@ -39,6 +39,14 @@ class TempliteTest(CoverageTest):
# Variables use {{var}} syntax.
self.try_render("Hello, {{name}}!", {'name':'Ned'}, "Hello, Ned!")
+ def test_undefined_variables(self):
+ # Using undefined names is an error.
+ self.assertRaises(
+ Exception,
+ self.try_render,
+ "Hi, {{name}}!", {}, "xyz"
+ )
+
def test_pipes(self):
# Variables can be filtered with pipes.
data = {