diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2013-10-27 18:34:06 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2013-10-27 18:34:06 -0400 |
commit | 8c275cd9b8817d0a817ebce853c111d11ceb86e9 (patch) | |
tree | 0ebb5403918adc866d60a0f00fe0901899a85cf1 /tests/test_templite.py | |
parent | 81f057339363478d626244f4cd1159cc4211a187 (diff) | |
download | python-coveragepy-git-8c275cd9b8817d0a817ebce853c111d11ceb86e9.tar.gz |
More tests of Templite's sad-path behavior.
Diffstat (limited to 'tests/test_templite.py')
-rw-r--r-- | tests/test_templite.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_templite.py b/tests/test_templite.py index e3918e4b..7326d241 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 = { |