A simple pytest plugin to import names and add them to the doctest namespace.
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pytest-doctest-import-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b9201bdc15abed44f2c64ea2788c7ac745743b2180bfba532df71f6b320e6f4 |
|
MD5 | ec2013340def45d2e16fe58a7f923df8 |
|
BLAKE2b-256 | 5616262a19c708bdf9ed7776087775f21da7aa8a02167fa6bef5acd30049e06f |
Close
Hashes for pytest_doctest_import-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5868941b1d64ed068486831f6c815871e3f6a58e3a18ffeb428e7534acbd4c6 |
|
MD5 | f9960a1605323aa2a67ac9c4818db592 |
|
BLAKE2b-256 | 542992570ec16b645cd06305b985fe503ad5f941fbae696afcce43d7a11cfeac |