summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorianb <devnull@localhost>2007-06-13 02:59:54 +0000
committerianb <devnull@localhost>2007-06-13 02:59:54 +0000
commitec2dc54ea78b8ebbe9e0d62d0aaa6386b81ba6cb (patch)
treeb6beb557e5e8648ab46ece3b80ab096b06eb2848 /tests
parentd47074a63528d1885de8f4e1363687b15f050031 (diff)
downloadpaste-ec2dc54ea78b8ebbe9e0d62d0aaa6386b81ba6cb.tar.gz
Add a little helper to run doctests
Diffstat (limited to 'tests')
-rw-r--r--tests/test_doctests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_doctests.py b/tests/test_doctests.py
index bdbe2b1..875fbc2 100644
--- a/tests/test_doctests.py
+++ b/tests/test_doctests.py
@@ -49,3 +49,12 @@ def do_doctest_mod(module):
failure, total = doctest.testmod(
module, optionflags=options)
assert not failure, "Failure in %r" % module
+
+if __name__ == '__main__':
+ import sys
+ import doctest
+ args = sys.argv[1:]
+ if not args:
+ args = filenames
+ for filename in args:
+ doctest.testfile(filename, module_relative=False)