~testdoc-dev/testdoc/trunk.git

« back to all changes in this revision

Viewing changes to bin/testdoc

  • Committer: Andrew Bennetts
  • Date: 2010-09-06 13:06:48 UTC
  • mto: This revision was merged to the branch mainline in revision 19.
  • Revision ID: git-v1:fbfe284aad90438dd160357dd1cf13b78095f32b
Allow multiple modules to be passed on the command line.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
def make_options():
31
31
    from optparse import OptionParser
32
32
    parser = OptionParser(
33
 
        usage="usage: %prog [options] <fully-qualified module name>")
 
33
        usage="usage: %prog [options] MODULE_NAME [MODULE_NAME ...]")
34
34
    format_choices = sorted(formats.keys())
35
35
    parser.add_option("-f", "--format", dest="format",
36
36
        choices=format_choices, metavar="FORMAT",
51
51
    (options, args) = parser.parse_args()
52
52
    format = formats[options.format](sys.stdout)
53
53
    doc = documenter.Documenter(format)
54
 
    module = string_to_module(args[0])
55
 
    finder.find_tests(doc, module)
 
54
    for arg in args:
 
55
        module = string_to_module(arg)
 
56
        finder.find_tests(doc, module)
56
57
 
57
58
 
58
59
if __name__ == '__main__':