summaryrefslogtreecommitdiff
path: root/test/test_templite.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-11-21 08:38:26 -0500
committerNed Batchelder <ned@nedbatchelder.com>2009-11-21 08:38:26 -0500
commitc4c228fd7c7056ca4dc69391e16cc1832f9738a8 (patch)
treef2a6d8528cf9f277f5f275a3cab6ad535baaee99 /test/test_templite.py
parent002c59c122f5a72868c9a3835f692968eb689b0a (diff)
downloadpython-coveragepy-git-c4c228fd7c7056ca4dc69391e16cc1832f9738a8.tar.gz
Increase templite test coverage, and use the new branch awesomeness when coverage testing ourselves.
Diffstat (limited to 'test/test_templite.py')
-rw-r--r--test/test_templite.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_templite.py b/test/test_templite.py
index 6b445aa2..f2c20f94 100644
--- a/test/test_templite.py
+++ b/test/test_templite.py
@@ -191,13 +191,18 @@ class TempliteTest(unittest.TestCase):
"@a0b0c0a1b1c1a2b2c2!"
)
- def test_exception(self):
+ def test_exception_during_evaluation(self):
# TypeError: Couldn't evaluate {{ foo.bar.baz }}:
# 'NoneType' object is unsubscriptable
self.assertRaises(TypeError, self.try_render,
"Hey {{foo.bar.baz}} there", {'foo': None}, "Hey XXX there"
)
+ def test_bogus_tag_syntax(self):
+ self.assertRaises(SyntaxError, self.try_render,
+ "Huh: {% bogus %}!!{% endbogus %}??", {}, ""
+ )
+
if __name__ == '__main__':
unittest.main()