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

Using `` maxsplit=1`` from ``use-maxplit-args`` will make splits slightly faster and is the important one that will improve performances. The other fix are about readability / style.

It seems that if pytest is run in a development directory, it can create files in `site-packages/.../__pycache__` which can cause modules to continue getting "imported" even when they are uninstalled....

type: enhancement
topic: rewrite

Suppose you have a test that may fail with a very large diff; say: ```python def test_xyz() -> None: assert ["x"] * 10_000 == ["x\n"] * 10_000 ``` With normal...

type: performance
plugin: junitxml

The magic name-matching of pytest's fixtures can lead to namespace clashes, apart from being unpythonic (see #3834). Getting a wrong fixture may lead to hard-to-debug errors, especially if one does...

topic: reporting
type: backward compatibility
topic: fixtures

I started giving more and more pytest trainings recently, and noticed a confusion almost everyone stumbles over when using parametrize the first time. Many people accidentally write: ```python import pytest...

topic: parametrize

Hello here! I'm posting this following another older topic I found about someone having the same issue: https://github.com/pytest-dev/pytest/issues/6945, but this was related to a way older version of Pytest than...

plugin: junitxml

In https://github.com/jaraco/keyring/issues/673, I captured an issue stemming from the introduction of `--import-mode importlib` to jaraco/skeleton projects. In https://github.com/jaraco/keyring/commit/6ff02e0eefcd90e271cefd326b460ecfa0e3eb9e, I'm attempting to enable importlib mode for all projects in order to...

topic: collection

When there are some pytest plugins disabled using the `-p no:XXX` option the information about disabled plugins is not passed down to the `runpytest()` call, so the initially disabled plugin...

Using ``exc_info.exconly(tryshort=True)`` is meant to remove ``AssertionError: `` from the exception message according to [(ref)](https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest.ExceptionInfo.exconly) > When 'tryshort' resolves to True, and the exception is an AssertionError, only the actual...

type: bug

In #4826 (and earlier with `--strict`), we introduced warnings for *applying* unregistered marks, because otherwise something like: ```python @pytest.mark.sloww # sic! def test_slow(): pass ``` would be a silent failure,...

type: proposal
topic: marks