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

As follow up to https://github.com/pytest-dev/pytest/discussions/9947, add a dedicated page describing how to use types with pytest: how to type tests, fixtures, etc.

type: docs

#### What's the problem this feature will solve? Reduce code duplication. Allow leveraging the setup,teardown features of pytest fixtures while allowing fixtures to be a bit more re-usable, like functions...

Tests found but deselected when running pytest when attempting to use `addoption` command line parsing for custom argument `--keyword`. Test selection would note that tests were found but not selected....

- [ ] Include documentation when adding new features. - [x] Include new tests or update existing tests when applicable. - [X] Allow maintainers to push and squash when merging...

bot:chronographer:provided

#### What's the problem this feature will solve? unlike normal context managers, fixtures functions cannot easily be used in a manual way as a contextmanager #### Describe the solution you'd...

Currently linked schema https://github.com/jenkinsci/xunit-plugin/blob/xunit-2.3.2/src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd#L127 allows a file attribute in `` nodes. It's currently missing but would be very useful. AFAICS junitxml plugin dumps everything under a single testsuite node. It...

type: enhancement
plugin: junitxml

Please consider allowing `pytest` to display its help without checking that the config is correct. If I do a typo in conftest.py, I can't run `pytest -h` without fixing it....

[Pytester.syspathinsert()](https://github.com/pytest-dev/pytest/blob/3ad4344656e8abe95d5b86cd83087836ae9cdaa5/src/_pytest/pytester.py#L901) uses `monkeypatch` to temporarily update `sys.path` for the length of the test. However, [runpytest_subprocess()](https://github.com/pytest-dev/pytest/blob/3ad4344656e8abe95d5b86cd83087836ae9cdaa5/src/_pytest/pytester.py#L1485) starts a new process to without any knowledge of requested changes to `sys.path`. Using pytest...

type: bug
plugin: pytester

### System Info - Pytest Version: 8.3.3 - OS: Windows 10 ## The problem Currently pytest doesn't collect classes that contain `__init__` which seems to conflict with `typing.Protocol`: ```py class...

This inspired by a discussion: https://github.com/pytest-dev/pytest/discussions/12748 #### What's the problem this feature will solve? We have a project that's about a different kind of test. We have a lot of...