| Port variant | v13 |
| Summary | Pytest: simple powerful testing with Python (3.13) |
| Package version | 9.1.1 |
| Homepage | https://docs.pytest.org/en/latest/ |
| Keywords | python |
| Maintainer | Python Automaton |
| License | Not yet specified |
| Other variants | v14 |
| Ravenports | Buildsheet | History |
| Ravensource | Port Directory | History |
| Last modified | 24 JUL 2026, 16:11:02 UTC |
| Port created | 24 JUL 2026, 16:11:02 UTC |
| single | :align: center
:height: 200
:alt: pytest
------
:alt: Code coverage Status
:alt: pre-commit.ci status
:alt: Documentation Status
:alt: Discord
:alt: Libera chat
The pytest framework makes it easy to write small tests, yet
scales to support complex functional testing for applications and
libraries.
An example of a simple test:
.. code-block:: python
# content of test_sample.py
def inc(x):
return x + 1
def test_answer():
assert inc(3) == 5
To execute it::
$ pytest
============================= test session starts
=============================
collected 1 items
test_sample.py F
================================== FAILURES
===================================
_________________________________ test_answer
_________________________________
def test_answer():
> assert inc(3) == 5
E assert 4 == 5
E + where 4 = inc(3)
test_sample.py:5: AssertionError
========================== 1 failed in 0.04 seconds
===========================
Thanks to pytest's detailed assertion introspection, you can simply use
plain assert statements. See `getting-started
|
| Build (only) |
python313:dev:std python-pip:single:v13 autoselect-python:single:std |
| Build and Runtime | python313:primary:std |
| Runtime (only) |
python-iniconfig:single:v13 python-packaging:single:v13 python-pluggy:single:v13 python-Pygments:single:v13 |
| main | mirror://PYPIWHL/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f |
| python-tempora:v13 | Time and date routines (3.13) |