You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: example/README.md
+11-6
Original file line number
Diff line number
Diff line change
@@ -69,9 +69,14 @@ gcd.py
69
69
Alternative, using pytest
70
70
-------------------------
71
71
72
-
For pytest users, the example_conftest.py file shows how to
73
-
automatically configures pytest to collect types when running tests.
74
-
The test_gcd.py file contains a simple test to demonstrate this. Copy
75
-
the contents of example_conftest.py to your conftest.py file and run
76
-
pytest; it will then generate a type_info.json file like the one
77
-
above.
72
+
For pytest users, pytest can collect types when running tests. The test_gcd.py
73
+
file contains a simple test to demonstrate this. You can run the pyannotate
74
+
pytest plugin with the argument `-p pyannotate_tools.pytest` or by adding the
75
+
plugin to your `conftest.py` (See [installing and using plugins](https://docs.pytest.org/en/latest/plugins.html#installing-and-using-plugins) for more information about pytest plugins).
76
+
77
+
For a full example (it will generate output.json like the one above):
78
+
79
+
```
80
+
# omit --type-info to use the default of type_info.json
0 commit comments