From: Sebastián Ramírez Date: Fri, 12 Apr 2019 17:45:19 +0000 (+0400) Subject: :memo: Add note on installing and running pytest X-Git-Tag: 0.14.0~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ab6dd6099727362b7ba2d8317414bf8078c33f90;p=thirdparty%2Ffastapi%2Ffastapi.git :memo: Add note on installing and running pytest --- diff --git a/docs/tutorial/testing.md b/docs/tutorial/testing.md index dcb50ab4ca..61352d033a 100644 --- a/docs/tutorial/testing.md +++ b/docs/tutorial/testing.md @@ -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 +```