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

The ExceptionGroup class is only available in Python 3.11 and later versions. If you're using an older version of Python, that's why you're seeing this NameError.

- `pytester` tests that require `pexpect` are silently skipped if `pexpect` is unavailable: https://github.com/pytest-dev/pytest/blob/f373974707f57a0b28d12563e4d03c7cd54c70d9/src/_pytest/pytester.py#L1513 - We default to not installing `pexpect` even on CI, only having it as an optional...

type: selftests

With 8.3.3 (as well as the current `main`, f373974707f57a0b28d12563e4d03c7cd54c70d9), something like ```python import pytest def test_stuff(fixt): pass @pytest.fixture def fixt(request): yield # e.g. store screenshots on failures for GUI tests...

topic: reporting
topic: fixtures

`pytest tests/test_foo.py:42` should run the (nearest) test at line 42 in `tests/test_foo.py`. When it also ignores a trailing colon it would allow for easy copy'n'pasting from failures. Via #5973: >...

type: enhancement
topic: selection

- [X] a detailed description of the bug or problem you are having - [ ] output of `pip list` from the virtual environment you are using (not using pip)...

type: bug
topic: parametrize
topic: collection
topic: selection
topic: marks

Currently, at both -1 and -2 the test cases reporting uses the "sea of dots". For test suites which are both very large and relatively slow, this representation is not...

With https://github.com/pytest-dev/pytest/pull/12875/files#r1796219568 I noticed that `src/pytest` is not displayed in Codecov. I've since discovered that the configuration of Coveragepy is quite ancient, and here's my attempt to update it in...

skip news

I am using pytest.main function call to create a flask test command ``` python @app.cli.command() @click.option('-c', '--cov-report', type=click.Choice(['term', 'term-missing']), help="Turn on coverage reporting") @click.option('-d', '--debug', is_flag=True, help="Enter pdb on test...

status: help wanted

Hi, it seems there's an issue when trying to use a standard system output stream that was saved before calling pytest.main on MS-Windows ``` E OSError: [WinError 6] The handle...

potentially closes #12081(and more!) - [x] Include documentation when adding new features. - [x] Include new tests or update existing tests when applicable. - [X] Allow maintainers to push and...

bot:chronographer:provided