pytest
pytest copied to clipboard
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
This adds separators like the one used in the live-log-output, e.g. `--- live log setup ---`, to the generated log file. In addition to that also the traceback is written...
#### What's the problem this feature will solve? The current data structure for assertion AST, which contains assertion explanations, is a large chunk of string generated in [rewrite.py](https://github.com/pytest-dev/pytest/blob/main/src/_pytest/assertion/rewrite.py). This string...
Hello, `test_pdb_used_outside_test` and `test_pdb_used_in_generate_tests` are failing with Python 3.13 beta 2 on Fedora Rawhide. The same error was observed also with pytest 7.4.3. ~~~~ + /builddir/build/BUILD/pytest-8.2.2-build/BUILDROOT/usr/bin/pytest testing --timeout=30 -n auto...
In pypa/distutils#259, I'm tracking down an emergent regression in the import logic that breaks the test suite on pytest 8.1 and 8.2. It looks like it's successfully discovering `distutils/cygwincompiler.py`, but...
# Description: When using indirect parameterization with a module-scoped fixture, the fixture is invoked multiple times instead of once per module. This behavior seems incorrect, as it defeats the purpose...
- [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...
Since 8.2.0 and changes to [unittest collecting](https://github.com/pytest-dev/pytest/commit/1a5e0eb71d2af0ad113ccd9ee596c7d724d7a4b6) pytests behaves now slightly differently. If there is @property defined in unittest class it is called during tests collection. This leads to some...
Hey! Thanks for this great library! I am using pytest.approx to compare between 2 dicts (which are not in the same order), whenever the 2 dicts are equal the asserts...
The following file, ``` python import math def square_root(n): """ >>> square_root(4) 2.0 >>> square_root(-1) Traceback (most recent call last): ... AssertionError: number must not be negative """ assert n>=...
#### What's the problem this feature will solve? When some tests run for a very long time it is important to be able to know what are these tests. Currently...