pytest icon indicating copy to clipboard operation
pytest copied to clipboard

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing

Results 653 pytest issues
Sort by recently updated
recently updated
newest added

Fixes #13304 The documentation in "Writing hook functions" incorrectly suggested that hook implementations in `conftest.py` files are accessible during `pytest_addoption()` execution. This led to confusion when developers tried to use...

bot:chronographer:provided

## Description This PR automates uploading JUnit reports to codecov in the test pipeline. An example pipeline run with the changes can be found here (https://github.com/aleguy02/fork-pytest/actions/runs/18184970357). An example of what...

type: infrastructure
bot:chronographer:provided
backport 9.0.x

We have this test in aiohttp: ``` def test_testcase_no_app( testdir: pytest.Testdir, loop: asyncio.AbstractEventLoop ) -> None: testdir.makepyfile( """ from aiohttp.test_utils import AioHTTPTestCase class InvalidTestCase(AioHTTPTestCase): def test_noop(self) -> None: pass """...

topic: collection
type: regression

Python 3.14 added a new module [`concurrent.interpreters`](https://docs.python.org/3.14/library/concurrent.interpreters.html) which allows creating isolated sub-interpreters with their own GIL. I like the concept and experimented it with it a bit in pytest-xdist/execnet, trying...

type: enhancement
type: selftests

(This is a high-level issue that proposes making pytest more thread safe; I'm definitely looking for feedback, discussion, and confirmation this is a good direction here.) ### Background This issue...

type: performance
type: refactoring

This PR clarifies the `pytest.Config.getoption` docstring to make the exceptional behavior of `default` with `skip=True` explicit. Also adds a small test verifying that behavior. ### Stituation before this change The...

bot:chronographer:provided

On Linux, with the current git main of pytest (8.5.0.dev60+g67738403d), pluggy 1.6.0 and Python 3.13.1, this test runs fine: ```python import pytest @pytest.mark.parametrize("s", ["\ud800"]) def test_x(s): pass ``` but, somewhat...

topic: parametrize
topic: collection

## Problem The current summary format double-counts failures by adding test-level failures to subtest-level failures. **Scenario:** Running 3 tests: - Test A: no subtests, fails - Test B: 3 subtests,...

plugin: subtests

## Purpose Addresses a `FIXME` in `testing/python/raises_group.py` that pointed out the inconsistent use of `repr(type)` vs `type.__name__` in error messages. This PR refactors the `RaisesContext.__exit__` method in `src/_pytest/raises.py` to consistently...

bot:chronographer:provided

Location: https://docs.pytest.org/en/stable/how-to/subtests.html#subtests The documentation shows: ```pytest $ pytest -q test_subtest.py uuuuuF [100%] ``` where all the `u` characters are green (passing). Actual behavior: Running the example produces mixed results -...

type: bug
type: docs
plugin: subtests