Skip to main content

An object-oriented API to test doctests while unittest runs.

Project description

An object-oriented API to test doctests while unittest runs.

It is different from the Pyhton 2.4 doctest unittest API because:

  • Provides unittest loaders to load test cases out of doctests. Other loaders allow users to extract TestCase instances out of TestCase descendants and doctests (and any other format) in a single step.

  • Test analysis require no further parsing because unittest TestResult instances report whether individual examples have been successfully executed, or otherwise have failed or raised an unexpected exception. Formerly TestResult objects contained the whole report outputted by doctest module.

  • Adds object orientation and eliminates functions with big signatures.

  • Allows to parameterize the doctest run via doctest options, like before…

A fuller explanation can be found in the following article:

O. Lang “Doctest and unittest… now they’ll live happily together” (2008) The Python Papers, Volume 3, Issue 1, pp. 31:51

Note: The contents of this module were first implemented by the module

oop.utils.testing in the PyOOP package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dutest-0.1.0.zip (6.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page