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

- [x] a detailed description of the bug or problem you are having pytest flaky segfauls after running tests on my library when run with python 3.12 on macOS. The...

status: needs information
stale

Tests collection in pytest is time consuming if there are more tests like 50k and more. So if we want run a single tests it 99% time is consumed in...

status: needs information
stale

- [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...

status: needs information
stale

``` ==================================== ERRORS ==================================== ________________________ ERROR collecting test session _________________________ suite3_env/lib/python3.10/site-packages/_pytest/runner.py:341: in from_call result: Optional[TResult] = func() suite3_env/lib/python3.10/site-packages/_pytest/runner.py:372: in call = CallInfo.from_call(lambda: list(collector.collect()), "collect") suite3_env/lib/python3.10/site-packages/_pytest/main.py:743: in collect for x in...

status: needs information
stale

- [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...

status: needs information
stale

this is to follow up after a initial proposal by @brianmaissy in #4760 and #4736 key issues to decide on/highlight - [ ] new internal helper classes for date times...

type: proposal
topic: approx

#### What's the problem this feature will solve? 如图所示, 添加了 @pytest.hookspec def pytest_terminal_summary(terminalreporter): 方法之后,报告偶发就会跑到 ========xxx====== 线下面,没办法固定位置。能否有方法可以固定相对位置。(黄色日志) #### Describe the solution you'd like ![image](https://github.com/pytest-dev/pytest/assets/29268369/c7f342fd-1813-4cdc-a825-c8ad5682d227) ![image](https://github.com/pytest-dev/pytest/assets/29268369/f0e67d0f-f3b8-45b7-8d0f-c4619df1bd91) #### Alternative Solutions #### Additional context

status: needs information

When a fixture fails, Pytest reports an error: ``` python import pytest @pytest.fixture def fail(): assert False def test_pass(fail): pass ``` ``` ============================= test session starts ============================== platform linux --...

plugin: unittest

- To reuse `getfixtureclosure` in pruning dependency tree. In pytest, fixture closure of a test is computed twice if it's parametrized. The second computation takes place in `prune_dependency_tree`. They are...

based on https://github.com/pytest-dev/pytest-xdist/issues/406 the actual error was hidden since a warning as a exception will not carry on the provided location since it seems assumed that the warning happens soundly...

type: enhancement
type: proposal
type: feature-branch