File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 55[ ![ versions] ( https://img.shields.io/pypi/pyversions/pytest-examples.svg )] ( https://github.com/pydantic/pytest-examples )
66[ ![ license] ( https://img.shields.io/github/license/pydantic/pytest-examples.svg )] ( https://github.com/pydantic/pytest-examples/blob/main/LICENSE )
77
8- Pytest plugin for testing examples in docstrings and markdown files.
8+ Pytest plugin for testing Python code examples in docstrings and markdown files.
9+
10+ ` pytest-examples ` can:
11+ * lint code examples using ` ruff ` and ` black `
12+ * run code examples
13+ * run code examples and check print statements are inlined correctly in the code
14+
15+ It can also update code examples in place to format them and insert or update print statements.
916
1017## Installation
1118
@@ -41,6 +48,7 @@ def add_two_things(a, b):
4148 """
4249 ```py
4350 from my_lib import add_two_things
51+
4452 print(add_two_things(1, 2))
4553 #> 3
4654 ```
@@ -55,6 +63,7 @@ And here's an example of a markdown file, again documenting `add_two_things`:
5563
5664``` py
5765from my_lib import add_two_things
66+
5867print (add_two_things(1 , 2 ))
5968# > 3
6069```
You can’t perform that action at this time.
0 commit comments