-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
topic: rewriterelated to the assertion rewrite mechanismrelated to the assertion rewrite mechanism
Description
Hello,
When running pytest -vv, I get this:
def test_foo():
x = 42
L = list(range(40))
> assert x in L
E assert 42 in [0, 1, 2, 3, 4, 5, ...]
test_foo.py:4: AssertionError
I would expect it to fully expand the value of a list, like pytest does for equality comparisons when -vv is provided:
def test_foo():
x = 42
L = list(range(40))
> assert x == L
E assert 42 == [0, 1, 2, 3, 4, 5, ...]
E -42
E +[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]
test_foo.py:4: AssertionError
pytest version: 5.0.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
topic: rewriterelated to the assertion rewrite mechanismrelated to the assertion rewrite mechanism