-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed as not planned
Labels
topic: rewriterelated to the assertion rewrite mechanismrelated to the assertion rewrite mechanismtype: regressionindicates a problem that was introduced in a release which was working previouslyindicates a problem that was introduced in a release which was working previously
Description
- a detailed description of the bug or problem you are having
- output of
pip listfrom the virtual environment you are using - pytest and operating system versions
- minimal example if possible
When running python -m pytest -v for this function on pytest=7.1.0
def test_add():
assert 2 + 2 == 22, "This should fail"I get
========================================================================================= FAILURES ==========================================================================================
_________________________________________________________________________________________ test_add __________________________________________________________________________________________
def test_add():
> assert 2 + 2 == 22, "This should fail"
E AssertionError: This should fail
E assert (2 + 2) == 22
tests/test_chapter5.py:2: AssertionErrorwhen I should be getting this instead
========================================================================================= FAILURES ==========================================================================================
_________________________________________________________________________________________ test_add __________________________________________________________________________________________
def test_add():
> assert 2 + 2 == 22, "This should fail"
E AssertionError: This should fail
E assert 4 == 22
E +4
E -22
tests/test_chapter5.py:2: AssertionError- I get the correct output on
pytest=7.0.1. - Still getting the wrong output as of
pytest=7.2.2(current version at time of this writing). - The output behaviour changed from fac8f28 onwards, not sure if this is working as intended.
- Using
-vvinstead of-vproduces the same result.
System
Python 3.10.9. Linux x64 Kernel 6.1.12-1-MANJARO
pip list output
Package Version
-------------- -------
attrs 22.2.0
exceptiongroup 1.1.0
iniconfig 2.0.0
more-itertools 9.1.0
packaging 23.0
pip 23.0.1
pluggy 0.13.1
py 1.11.0
pytest 7.2.2
setuptools 67.5.1
toml 0.10.2
tomli 2.0.1
itsJustAbe
Metadata
Metadata
Assignees
Labels
topic: rewriterelated to the assertion rewrite mechanismrelated to the assertion rewrite mechanismtype: regressionindicates a problem that was introduced in a release which was working previouslyindicates a problem that was introduced in a release which was working previously