Theme
Auto
Light
Dark
Table of Contents
doctest
— Test interactive Python examples
Simple Usage: Checking Examples in Docstrings
Simple Usage: Checking Examples in a Text File
Command-line Usage
How It Works
Which Docstrings Are Examined?
How are Docstring Examples Recognized?
What’s the Execution Context?
What About Exceptions?
Option Flags
Directives
Warnings
Basic API
Unittest API
Advanced API
DocTest Objects
Example Objects
DocTestFinder objects
DocTestParser objects
TestResults objects
DocTestRunner objects
OutputChecker objects
Debugging
Soapbox
Previous topic
Python Development Mode
Next topic
unittest
— Unit testing framework