Python Library Reference
Previous: Up: 23.2 doctest Next:


23.2.6 Advanced API

The basic API is a simple wrapper that's intended to make doctest easy to use. It is fairly flexible, and should meet most users' needs; however, if you require more fine-grained control over testing, or wish to extend doctest's capabilities, then you should use the advanced API.

The advanced API revolves around two container classes, which are used to store the interactive examples extracted from doctest cases:

Additional processing classes are defined to find, parse, and run, and check doctest examples:

The relationships among these processing classes are summarized in the following diagram:

 list of:
+------+ +---------+
|module| --DocTestFinder-> | DocTest | --DocTestRunner-> results
+------+ | ^ +---------+ | ^ (printed)
 | | | Example | | |
 v | | ... | v |
 DocTestParser | Example | OutputChecker
 +---------+



Subsections

Python Library Reference
Previous: Up: 23.2 doctest Next:

Release 2.5.2, documentation updated on 21st February, 2008.
See About this document... for information on suggesting changes.

AltStyle によって変換されたページ (->オリジナル) /