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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7f32045ba7c1f09be84d69f1946e61d8e73fa525df834ad091a226fd308ac20 |
|
MD5 | 72c1a02112146db7b523958a61d2f19c |
|
BLAKE2b-256 | 58a3f671d93f5db3c96ad12483dca8bfc049ed64582340eb372e788cd2106cbb |
Close
Hashes for pytest_doctest_import-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b840c12c84cd557fe0bd6ea24817f476f7f610209afeae1c7ff34f24c9822e0 |
|
MD5 | f8e44ef1e90e7c7125a606576e0efc05 |
|
BLAKE2b-256 | 70027aff0a4c93fd80499742382346a44d85fe77482226a1f859bde0cc09ef24 |