pytest icon indicating copy to clipboard operation
pytest copied to clipboard

Extra info in assertion is truncated even with `-vv`

Open The-Compiler opened this issue 1 year ago • 1 comments

We've had a couple of related issue, but I couldn't find this specific case reported before.

With the current git main:

platform linux -- Python 3.12.3, pytest-8.2.0.dev99+g1d322ffb4, pluggy-1.5.0

doing something like:

def test_x():
    assert False, dir("")

results in:

    def test_x():
>       assert False, dir("")
E       AssertionError: ['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', ...]
E       assert False

and even with -vv, the output never seems to get more verbose.

The-Compiler avatar May 11 '24 16:05 The-Compiler

Might be related to (if not a duplicate of) #6682?

The-Compiler avatar May 14 '24 13:05 The-Compiler