Pytest plugin for testing examples in docstrings and markdown files.
Project description
pytest-examples
Pytest plugin for testing examples in docstrings and markdown files.
Installation
pip install -U pytest-examples
Usage
import pytest
from pytest_examples import find_examples, CodeExample, ExampleRunner
@pytest.mark.parametrize('example', find_examples('foo_dir', 'bar_file.py'))
def test_docstrings(example: CodeExample, run_example: ExampleRunner):
run_example.run(example)
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
pytest_examples-0.0.2.tar.gz
(5.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_examples-0.0.2.tar.gz.
File metadata
- Download URL: pytest_examples-0.0.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3038655fc92d9f0800967a294681c997a3a284a44eacc590068e8cc64adb88d
|
|
| MD5 |
e5ef83f9f1e62b338134176e21a48229
|
|
| BLAKE2b-256 |
abbd11f962c1edad858b978c70e1f6c7772606f07b3458686bc82557f8031a4f
|
File details
Details for the file pytest_examples-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pytest_examples-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b34515dea994c5b359ee36db337bc53a3bb02d402c5bf6f2ec0f9207d27bd8a
|
|
| MD5 |
e3963d4cdf46c5cbc07387af1764a4a5
|
|
| BLAKE2b-256 |
be9becd84f97c7ac94b5813f73dd8332a9d00baaf58da8e5d8abc321909d57c4
|