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

Following https://github.com/pytest-dev/pytest/pull/13380, pytest-trio's tests fail with an `IndexError` when trying to display a traceback. Minimal reproducer with pytest 8.4.2 and pytest-trio 0.8.0 on Debian testing: ```python import pytest @pytest.mark.trio async...

type: bug
topic: tracebacks

Testing with tip-of-main to try out new subtests integration. Simple subtest example ``` def test_subtests(subtests): """Simple subtest example""" for i in range(2): with subtests.test(msg="is_even", i=i): assert i % 2 ==...

plugin: junitxml
plugin: subtests

Hello, This PR resolves [#13902](https://github.com/pytest-dev/pytest/issues/13902). ### Description This PR corrects the subtests documentation example, which currently uses `.. code-block:: pytest` and displays all `u` characters in green. This is misleading...

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.8 to 7.0.9. Release notes Sourced from peter-evans/create-pull-request's releases. Create Pull Request v7.0.9 ⚙️ Fixes an incompatibility with the recently released actions/checkout@v6. What's Changed ~70 dependency updates...

dependencies
github_actions

#### What's the problem this feature will solve? When running tests using subtests in pytest, failures are being double-counted in the final summary. For example, if 1 test is being...

type: bug
topic: reporting

Hi I have a monorepo, where I have following directory structure ``` Project/ repo/ pkg1/ src/ tests/ … __init__.py test_main.py pkg2/ src/ tests/ … __init__.py test_main.py ``` I also have...

type: question
topic: collection

I have an inherited fixture from a baseclass. From searching this can work [63292928](https://stackoverflow.com/questions/63292928/add-pytest-fixtures-to-a-test-class-using-dependency-injection). However my example uses a class scope which does then not work. The provided example will...

type: refactoring
topic: fixtures

## Bug Description When `testpaths` in `pyproject.toml` points to a directory outside the rootdir using a relative path like `../tests/sdk`, conftest.py fixture scoping does not work correctly. Fixtures from nested...

topic: collection
topic: fixtures

I'm using pytest 8.4.1, Python 3.11. I'm on a Mac, but I also see this problem in our Linux-based CI. My test suite contains several `conftest.py` files in the file...

type: bug

I noticed that Sphinx now exposes a [standard `confval` directive](https://www.sphinx-doc.org/en/master/usage/domains/standard.html#directive-confval), so let's use it instead of our own. It also has `:type:` and `:option:` options, let's use them too.

bot:chronographer:provided