pytest
pytest copied to clipboard
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
Python 3.11, Windows 11, pytest==8.2.2 1. Create new_test.py in your current folder. ```python import sys print(sys.path) ``` 2. Run `py -P -m pytest new_test.py --capture=no` ``` C:\numpy> py -P -m...
These tests are known to only be executed partially or not at all. So we always get incomplete, missing, and sometimes flaky, coverage in the test functions that are expected...
closes #12505 - Updated the `RaisesContext` class in `src/_pytest/python_api.py` to catch `re.error` and call `pytest.fail` with a clear error message. - Added a test case in `testing/python/raises.py` to validate the...
In #11220, an unintended change in reordering was introduced by changing the way indices were assigned to direct params. This PR reverts that change and reduces #11220 changes to just...
The following snippet would have resulted in crash on multiple places since `_get_verbose_word` expects only string, not a tuple. ```python @pytest.hookimpl(tryfirst=True) def pytest_report_teststatus(report: pytest.CollectReport | pytest.TestReport, config: pytest.Config): if report.when...
Current state deals with the setup outcome only: * testing only for "failed" should not be reported as "or skipped" * test for "skipped" explicitly instead I'm unclear what to...
@RonnyPfannschmidt this results in the `|release|` RST substitution having the value of `8.2` which might have a weird perception in changelog draft titles: https://docs.pytest.org/en/8.2.x/changelog.html#to-be-included-in-vrelease-if-present / https://docs.pytest.org/en/latest/changelog.html#to-be-included-in-vrelease-if-present. Should this be something...
- [X] a detailed description of the bug or problem you are having - [NA] output of `pip list` from the virtual environment you are using - [X] pytest and...