| Port variant | v15 |
| Summary | Pytest: simple powerful testing with Python (3.15) |
| Package version | 9.2.0 |
| 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 | 13 NOV 2026, 13:25:52 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) |
python315:dev:std python-pip:single:v15 autoselect-python:single:std |
| Build and Runtime | python315:primary:std |
| Runtime (only) |
python-iniconfig:single:v15 python-packaging:single:v15 python-pluggy:single:v15 python-Pygments:single:v15 |
| main | mirror://PYPIWHL/51/39/1f5d8c8877a0fa327db959c19341d4be61660de1ab6b7391f9eb805bcd67 |
| python-tempora:v15 | Time and date routines (3.15) |