pytest
pytest copied to clipboard
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
I have to suspend the global capture, because I ask the user for some user input in my pytest plugin. But this leads to a changed terminal width. **conftest.py** ```...
#### What's the problem this feature will solve? I was going absolutely batty about why my `pyproject.toml` pytest options, particularly `filterwarnings` settings weren't actually filtering some warnings. The document on...
Hi ! I am witnessing this memory usage increase on `fpdf2`, using [memunit](https://github.com/mschwager/memunit): https://github.com/PyFPDF/fpdf2/issues/641 A contributor also mentioned that it was reported on StackOverflow some years ago: https://stackoverflow.com/questions/20900380/py-test-excessive-memory-usage-with-large-number-of-tests **In short:**...
`makepyfile` is ignoring the encoding parameter, in both `pytester` and `testdir` fixtures. found the issue working on windows with `cp1252` encoding and using [`pytest-doctestplus`](https://github.com/scientific-python/pytest-doctestplus/issues/285). i traced the issue to [`makepyfile`](https://github.com/pytest-dev/pytest/blob/252cf3bf8f568e5a7a8b97e7cf1c2b98824c64bb/src/_pytest/pytester.py#L871),...
- [X] a detailed description of the bug or problem you are having - [X] output of `pip list` from the virtual environment you are using (`uv tree used`) -...
#### What's the problem this feature will solve? @RonnyPfannschmidt confirmed that issue #3217 is a feature, not a bug. This however created hours of confusion for me as it led...
- [x] a detailed description of the bug or problem you are having We've converted an older setuptools/`setup.py` based project to `uv` and `pyproject.toml`. The editable installation (using `uv sync`)...
- [x] a detailed description of the bug or suggestion - [x] output of `pip list` from the virtual environment you are using - [x] pytest and operating system versions...
As demonstrated by #12888 and #13170, there is subtly different behavior regarding to input with uv-managed Pythons from [python-build-standalone](https://github.com/astral-sh/python-build-standalone), as those [use `libedit` instead of `readline`](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html#use-of-libedit-on-linux). The existing tests in...
Dear Pytest team, I’ve encountered a bug on Windows where conftest.py is loaded multiple times if the path to the test files is specified with differing case on a case-insensitive...