-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
topic: rewriterelated to the assertion rewrite mechanismrelated to the assertion rewrite mechanismtype: bugproblem that needs to be addressedproblem that needs to be addressedtype: 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
this is boiled down from a more complicated case
def test():
y = range(5)
assert not all(x for x in y)
$ pytest t.py
============================= test session starts ==============================
platform linux -- Python 3.6.7, pytest-4.6.1, py-1.8.0, pluggy-0.12.0
rootdir: /tmp
collected 1 item
t.py F [100%]
=================================== FAILURES ===================================
_____________________________________ test _____________________________________
def test():
y = range(5)
> assert not all(x for x in y)
E assert 0
t.py:3: AssertionError
=========================== 1 failed in 0.04 seconds ===========================
$ pytest t.py --assert=plain
============================= test session starts ==============================
platform linux -- Python 3.6.7, pytest-4.6.1, py-1.8.0, pluggy-0.12.0
rootdir: /tmp
collected 1 item
t.py . [100%]
=========================== 1 passed in 0.01 seconds ===========================```
FabioLuporini and georgebisbas
Metadata
Metadata
Assignees
Labels
topic: rewriterelated to the assertion rewrite mechanismrelated to the assertion rewrite mechanismtype: bugproblem that needs to be addressedproblem that needs to be addressedtype: 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