Skip to main content

A simple pytest plugin to import names and add them to the doctest namespace.

Project description

PyPI Version Build Status Code Coverage

A simple pytest plugin to import names and add them to the doctest namespace.

Installing

Install this package with

pip install pytest-doctest-import

Usage

Simply pass the import names to --doctest-import when instantiating pytest.

To get the equivalent of import package.module use

pytest --doctest-modules --doctest-import "package.module"

To get the equivalent of from package import * use

pytest --doctest-modules --doctest-import "*<package"

To get the equivalent of from package import module as mymodule use

pytest --doctest-modules --doctest-import "module@mymodule<package"

License

This project is licensed under the MIT License.

Project details


Download files

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

Files for pytest-doctest-import, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size pytest_doctest_import-0.1.1-py2.py3-none-any.whl (4.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size pytest-doctest-import-0.1.1.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page