pytest
pytest copied to clipboard
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
Part of https://github.com/pytest-dev/pytest/issues/13768. I'm starting to work earnestly on https://github.com/pytest-dev/pytest/issues/13768, and figured I would start with a relatively simple fix + some general work for threading tests. If we really...
Added a public function which evaluates markers matching - Introduced match_markexpr to match marker expressions against markers or pytest Items. - Updated documentation to reflect the new function. - Added...
## Summary Using the `capteesys` fixture with `-s` (`--capture=no`) printed output twice, even if the fixture wasn’t used in the test body. This issue is tracked in [[pytest-dev/pytest#13784](https://github.com/pytest-dev/pytest/issues/13784)](https://github.com/pytest-dev/pytest/issues/13784) and is...
The [nanobind](https://github.com/wjakob/nanobind) test suite occasionally runs into a flake (*) where `capfd` does not correctly capture output printed to `stderr`. The structure of the test looks as follows: ```python def...
## Description Fixes #13817 When an invalid option name is provided to `pytest_addoption()` (e.g., missing the `--` prefix), pytest correctly detects the error but then fails while trying to display...
The color of the percentage will differ depending on the outcome of a test, where it's green if passing, yellow if warning, and red if erroring. *except* on warning +...
#### What's the problem this feature will solve? Flaky tests are a major pain point in modern CI/CD pipelines. Currently, pytest (and its ecosystem) supports retries via plugins like `pytest-rerunfailures`,...
Hi I have a situation where I have two teardown fixtures: - one raises exception - second performs `pytest.exit()` - I use it to stop testing session when only specific...
In #13804 I set the `__module__` on some exception/enum types since it shows up in tracebacks. We also already set it on warning types. I wonder if we should have...
Here is a quick checklist that should be present in PRs. - [ ] Include documentation when adding new features. - [ ] Include new tests or update existing tests...