Added doctests, hooked up all tests. Yay!
--HG--
branch : trunk
diff --git a/jinja2/testsuite/__init__.py b/jinja2/testsuite/__init__.py
index 1032094..a222777 100644
--- a/jinja2/testsuite/__init__.py
+++ b/jinja2/testsuite/__init__.py
@@ -59,7 +59,7 @@
def suite():
from jinja2.testsuite import ext, filters, tests, core_tags, \
loader, inheritance, imports, lexnparse, security, api, \
- regression, debug
+ regression, debug, utils, doctests
suite = unittest.TestSuite()
suite.addTest(ext.suite())
suite.addTest(filters.suite())
@@ -73,4 +73,6 @@
suite.addTest(api.suite())
suite.addTest(regression.suite())
suite.addTest(debug.suite())
+ suite.addTest(utils.suite())
+ suite.addTest(doctests.suite())
return suite
diff --git a/jinja2/testsuite/doctests.py b/jinja2/testsuite/doctests.py
new file mode 100644
index 0000000..616d3b6
--- /dev/null
+++ b/jinja2/testsuite/doctests.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.testsuite.doctests
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ The doctests. Collects all tests we want to test from
+ the Jinja modules.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD, see LICENSE for more details.
+"""
+import unittest
+import doctest
+
+
+def suite():
+ from jinja2 import utils, sandbox, runtime, meta, loaders, \
+ ext, environment, bccache, nodes
+ suite = unittest.TestSuite()
+ suite.addTest(doctest.DocTestSuite(utils))
+ suite.addTest(doctest.DocTestSuite(sandbox))
+ suite.addTest(doctest.DocTestSuite(runtime))
+ suite.addTest(doctest.DocTestSuite(meta))
+ suite.addTest(doctest.DocTestSuite(loaders))
+ suite.addTest(doctest.DocTestSuite(ext))
+ suite.addTest(doctest.DocTestSuite(environment))
+ suite.addTest(doctest.DocTestSuite(bccache))
+ suite.addTest(doctest.DocTestSuite(nodes))
+ return suite
diff --git a/jinja2/testsuite/utils.py b/jinja2/testsuite/utils.py
index b18e8e6..25dde8b 100644
--- a/jinja2/testsuite/utils.py
+++ b/jinja2/testsuite/utils.py
@@ -9,13 +9,16 @@
:license: BSD, see LICENSE for more details.
"""
import os
+import gc
import unittest
import pickle
+from jinja2.testsuite import JinjaTestCase
+
from jinja2 import Environment, Undefined, DebugUndefined, \
StrictUndefined, UndefinedError, Template, meta
-from jinja2.utils import LRUCache
+from jinja2.utils import LRUCache, escape
class LRUCacheTestCase(JinjaTestCase):