[TIP] examples of using epydoc programatically
piro at develer.com
Thu May 10 03:15:07 PDT 2007
Hello bear, and list,
i am one of the Epydoc developers and i have been signaled about this thread by
I don't know much about the issues discussed in this ML, so it's not very clear
to me what you want to do.
What do you want to test about the documentation? Do you want to write a test
that programmatically calls epydoc and fails if any of what Epydoc considers an
error is signaled in the log (such as bad reST format, missing link target...)?
In this case Epydoc has an handy facility: you can define your own `log.Logger`
subclass storing any relevant record into its state and register it using
`log.register_logger()`. After an epydoc run your logger state may tell you if
any error has been found.
The `main()` in the `cli` module  gathers the options from the command line
and config file and run the documentation build (line 738). The same module
contains examples of `log.Logger` subclasses, such as the one used to generate
an HTML log page in documentation is built in HTML format (line 1348), and
their registration (line 687).
Tell me if i have not understand what you want to do: i'll try to do better.
You may also look for help in the Epydoc mailing list.
Daniele Varrazzo - Develer S.r.l.
More information about the testing-in-python