diff options
| author | Ian Bicking <ian@ianbicking.org> | 2007-06-13 02:59:54 +0000 |
|---|---|---|
| committer | Ian Bicking <ian@ianbicking.org> | 2007-06-13 02:59:54 +0000 |
| commit | 32e2f6a2d5940adf1a78a7b618e3f1c2090f8edb (patch) | |
| tree | b6beb557e5e8648ab46ece3b80ab096b06eb2848 /tests | |
| parent | e5cd25ffb3a583f3b2f72e04f189adbbcf1faba7 (diff) | |
| download | paste-git-32e2f6a2d5940adf1a78a7b618e3f1c2090f8edb.tar.gz | |
Add a little helper to run doctests
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_doctests.py | 9 |
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) |
