-
We use the `pytest_lazyfixture` here:
```bash
$ grep -r lazy_fixture
test/widget/test_currentlayouticon.py:from pytest_lazyfixture import lazy_fixture
test/widget/test_currentlayouticon.py:@pyte…
-
Original comment from #8243:
> Locally I'm seeing errors like this during teardown sometimes. Not quite sure how to reproduce because I wasn't seeing these when developing it, and it's happily putt…
-
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.
-
## Have you checked closed issues?
Yes
## Issue
The `App.run_test()` function is incompatible with pytest fixtures. Consider the following code example:
```py
import pytest
import pytest_as…
-
Has there been any consideration to migrate from the Python unittest module to pytest? pytest offers several advantages, such as:
- More concise and readable test code.
- Less boilerplate and less du…
-
## Environment data
- Pylance version: v2024.9.2
- OS and version: Win10.0.19045 Build 19045
- VSCode Version: 1.93.1
- Python version (& distribution if applicable, e.g. Anacond…
-
Something I see sometimes in my pytest company trainings is people accidentally doing:
```python
def test_something(self):
...
```
because they're using to writing things in classes (e.g.…
-
Running `ruff check --select DOC201 --preview --isolated` (Ruff version 0.6.2) on
```python
import pytest
@pytest.fixture
def foo() -> int:
"""A very helpful docstring."""
return 1…
-
**Describe the bug**
Following the basic use cases in the README does not work.
pytest returns `fixture 'message' not found`.
Tested with poetry and pip.
**To Reproduce**
```bash
poetry init
…
-
Tidy up structure of `tests/`.
Add [test fixtures](https://docs.pytest.org/en/stable/how-to/fixtures.html) for some of the repeatedly used modules, i.e.
```python
import pytest
@pytest.fixture…