mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-11-28 09:58:17 +08:00
10 lines
991 B
Markdown
10 lines
991 B
Markdown
# pytest
|
||
|
||
pytest is a popular, full-featured testing framework for Python. Tests are plain functions whose names start with `test_`, placed in files named `test_*.py` or `*_test.py`, and they use Python's built-in `assert` statement; when an assertion fails, pytest shows a detailed explanation of the values involved. Fixtures provide reusable setup and teardown that are injected into tests by name, `@pytest.mark.parametrize` runs the same test with different inputs, and a large plugin ecosystem adds features such as coverage reporting and parallel test runs. pytest can also run existing `unittest`-style tests.
|
||
|
||
Visit the following resources to learn more:
|
||
|
||
- [@official@Pytest Docs](https://docs.pytest.org/)
|
||
- [@article@Pytest Tutorial](https://www.tutorialspoint.com/pytest/index.htm)
|
||
- [@article@Effective Python Testing With Pytest](https://realpython.com/pytest-python-testing/)
|
||
- [@video@Pytest Tutorial – How to Test Python Code](https://www.youtube.com/watch?v=cHYq1MRoyI0) |