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.
Metadata
Release files for pytest-doctest-import 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest-doctest-import-0.1.1.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_doctest_import-0.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / pytest-doctest-import-0.1.1.tar.gz
| Download URL | pytest-doctest-import-0.1.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b9201bdc15abed44f2c64ea2788c7ac745743b2180bfba532df71f6b320e6f4
|
|
BLAKE2b-256 checksum How to use checksums |
5616262a19c708bdf9ed7776087775f21da7aa8a02167fa6bef5acd30049e06f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / pytest_doctest_import-0.1.1-py2.py3-none-any.whl
| Download URL | pytest_doctest_import-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a5868941b1d64ed068486831f6c815871e3f6a58e3a18ffeb428e7534acbd4c6
|
|
BLAKE2b-256 checksum How to use checksums |
542992570ec16b645cd06305b985fe503ad5f941fbae696afcce43d7a11cfeac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|