views:

39

answers:

1

Python's doctest module has a section for advanced API. Has anyone found a particular use for this API?

A quick look at the API structure (from the docs):

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

You use that API when you are extending doctests, like the nose unit testing suite does.

Mark Rushakoff