pytest
pytest copied to clipboard
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
- [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...
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...
- [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...
``` ==================================== 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...
- [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...
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...
#### What's the problem this feature will solve? 如图所示, 添加了 @pytest.hookspec def pytest_terminal_summary(terminalreporter): 方法之后,报告偶发就会跑到 ========xxx====== 线下面,没办法固定位置。能否有方法可以固定相对位置。(黄色日志) #### Describe the solution you'd like   #### Alternative Solutions #### Additional context
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 --...
- 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...