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.

Source Distribution

pytest-doctest-import-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_doctest_import-0.1.1-py2.py3-none-any.whl (4.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pytest-doctest-import-0.1.1.tar.gz.

File metadata

  • Download URL: pytest-doctest-import-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pytest-doctest-import-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8b9201bdc15abed44f2c64ea2788c7ac745743b2180bfba532df71f6b320e6f4
MD5 ec2013340def45d2e16fe58a7f923df8
BLAKE2b-256 5616262a19c708bdf9ed7776087775f21da7aa8a02167fa6bef5acd30049e06f

See more details on using hashes here.

File details

Details for the file pytest_doctest_import-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pytest_doctest_import-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pytest_doctest_import-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a5868941b1d64ed068486831f6c815871e3f6a58e3a18ffeb428e7534acbd4c6
MD5 f9960a1605323aa2a67ac9c4818db592
BLAKE2b-256 542992570ec16b645cd06305b985fe503ad5f941fbae696afcce43d7a11cfeac

See more details on using hashes here.

Supported by

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