diff options
| author | ianb <devnull@localhost> | 2007-06-13 02:59:54 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2007-06-13 02:59:54 +0000 |
| commit | ec2dc54ea78b8ebbe9e0d62d0aaa6386b81ba6cb (patch) | |
| tree | b6beb557e5e8648ab46ece3b80ab096b06eb2848 /tests | |
| parent | d47074a63528d1885de8f4e1363687b15f050031 (diff) | |
| download | paste-ec2dc54ea78b8ebbe9e0d62d0aaa6386b81ba6cb.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) |
