From c4c228fd7c7056ca4dc69391e16cc1832f9738a8 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 21 Nov 2009 08:38:26 -0500 Subject: Increase templite test coverage, and use the new branch awesomeness when coverage testing ourselves. --- test/test_templite.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/test_templite.py') 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() -- cgit v1.2.1