diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-21 08:38:26 -0500 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-21 08:38:26 -0500 |
| commit | 92278604cc979a6e034a371ef02f8c09abf69919 (patch) | |
| tree | 2286d6e944051465a9e1f5ff69251ef8bb87eff4 /test/test_templite.py | |
| parent | 6497a1f7a5d19ee31a6d7fb8552d308544980e2a (diff) | |
| download | python-coveragepy-92278604cc979a6e034a371ef02f8c09abf69919.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.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_templite.py b/test/test_templite.py index 6b445aa..f2c20f9 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() |
