About pytest¶
As the website of pytest mentions:
Quote
The pytest framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries.
How and why do we use pytest¶
We use pytest to test our services.
Install pytest¶
Install pytest with the following command:
In a terminal, execute the following command(s). | |
---|---|
Configuration¶
The configuration for pytest is located in the pyproject.toml
configuration file.
Common tasks¶
Run the tests¶
Run the tests with the following command:
In a terminal, execute the following command(s). | |
---|---|
Run the tests with console output¶
By default, pytest hides outputs to the console. To display all outputs, run pytest with the following command:
Resources and alternatives¶
These resources and alternatives are related to the current item (in alphabetical order).