Metadata-Version: 2.1
Name: markdown-pytest
Version: 0.1.3
Summary: A simple module to test your documentation examples with pytest
Home-page: https://github.com/mosquito/markdown-pytest
License: Apache-2.0
Keywords: pytest,markdown,documentation
Author: Dmitry Orlov
Author-email: me@mosquito.su
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Plugins
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Project-URL: Documentation, https://github.com/mosquito/markdown-pytest/blob/master/README.rst
Project-URL: Source, https://github.com/mosquito/markdown-pytest
Project-URL: Tracker, https://github.com/mosquito/markdown-pytest/issues
Description-Content-Type: text/markdown

markdown-pytest
===============

A simple module to test your documentation examples with pytest.

Markdown:

```markdown
    ```python
    assert True
    ```
```

Will be shown as:

```python
assert True
```

You can use the special value `__name__` to check to separate the run example 
and the test code.

Markdown:

```markdown
    ```python
    if __name__ == '__main__':
        exit(0)
    if __name__ == 'markdown-pytest':
        assert True
    ```
```

Will be shown as:

```python
if __name__ == '__main__':
    exit(0)
if __name__ == 'markdown-pytest':
    assert True
```

Code after the `# noqa` comment will not be executed.

```markdown
    ```python
    # noqa
    from universe import antigravity, WrongPlanet

    try:
        antigravity()
    except WrongPlanet:
        print("You are on the wrong planet.")
        exit(1)
    ```
```

Will be shown as:

```python
# noqa
from universe import antigravity, WrongPlanet

try:
    antigravity()
except WrongPlanet:
    print("You are on the wrong planet.")
    exit(1)
```

This README.md file might be tested like this:

```bash
$ poetry run pytest -sxv README.md                                                                                                                                    17:20:29 master
=============== test session starts ===============
plugins: md-0.1.0
collected 3 items

README.md::line[16-17] PASSED
README.md::line[36-40] PASSED
README.md::line[60-68] PASSED
```

