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 hashes)
Built Distribution
Close
Hashes for pytest_examples-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b34515dea994c5b359ee36db337bc53a3bb02d402c5bf6f2ec0f9207d27bd8a |
|
MD5 | e3963d4cdf46c5cbc07387af1764a4a5 |
|
BLAKE2b-256 | be9becd84f97c7ac94b5813f73dd8332a9d00baaf58da8e5d8abc321909d57c4 |