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 573 pytest issues
Sort by recently updated
recently updated
newest added

It looks like https://github.com/pytest-dev/pytest/pull/12346 got merged without reference to some of the previous discussions, e.g. https://github.com/pytest-dev/pytest/issues/10465. With `pytest` 8.4, this change causes workflows to fail if they return non-`None` values...

type: backward compatibility
type: regression

When the command-line args include both a directory with test files and a specific test file in that directory, pytest runs only the file and not the other files in...

I noticed a possible inaccuracy in the documentation on this[ page:](https://docs.pytest.org/en/stable/how-to/failures.html) The documentation states: "Also the faulthandler_timeout=X configuration option can be used to dump the traceback of all threads if...

type: docs
platform: windows

For example, if I want to add ignore for the deprecation warning that only happens on Python 3.5 and POSIX, I want some entries to only apply to that. The...

type: docs
topic: config

Explicitly pass `-Werror` to `runpytester()` in the few additional tests needing it, in order to fix test failures when the test suite is run with `-Wdefault` or a similar override....

bot:chronographer:provided

In 2017 there was an issue #2430 complaining that module-level calls to `warnings.filterwarnings` are getting reset by pytest and thus have no effect. PR #2445 added a fix for this...

type: bug
plugin: warnings
type: selftests

While looking at another issue I noticed that `pytest -Werror` results in `config.known_args_namespace.pythonwarnings` having the value `['error', 'error']`. That is the value is duplicated. This happens because: - We call...

type: bug
topic: config

- [x] a detailed description of the bug or problem you are having - [x] output of `pip list` from the virtual environment you are using - [x] pytest and...

Running `uv run pytest -o console_output_style=times tests/test_repro.py tests/test_repro_skip.py` gives me the following backtrace: ``` tests/test_repro.py . INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/code/.venv/lib/python3.12/site-packages/_pytest/main.py", line 289, in wrap_session INTERNALERROR>...

type: bug
topic: reporting
backport 8.4.x

As discussed in [this GitHub comment](https://github.com/pytest-dev/pytest/issues/13308#issuecomment-2911867744), pressing Ctrl+D in the debugger now quits the entire test session, whereas previously, it only failed the current test. We need to decide how...