]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
:memo: Add note on installing and running pytest
authorSebastián Ramírez <tiangolo@gmail.com>
Fri, 12 Apr 2019 17:45:19 +0000 (21:45 +0400)
committerSebastián Ramírez <tiangolo@gmail.com>
Fri, 12 Apr 2019 17:45:19 +0000 (21:45 +0400)
docs/tutorial/testing.md

index dcb50ab4cae2464c1ecbb6829c87549b38eb05ac..61352d033a1a6d3eac20340357135c71fa5e66d3 100644 (file)
@@ -67,3 +67,19 @@ When you need your event handlers (`startup` and `shutdown`) to run in your test
 ```Python hl_lines="9 10 11 12 20 21 22 23 24"
 {!./src/app_testing/tutorial003.py!}
 ```
+
+## Run it
+
+After that, you just need to install `pytest`:
+
+```bash
+pip install pytest
+```
+
+It will detect the files and tests automatically, execute them, and report the results back to you.
+
+Run the tests with:
+
+```bash
+pytest
+```