Skip to content

Extra info in assertion is truncated even with -vv #12307

@The-Compiler

Description

@The-Compiler

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: reportingrelated to terminal output and user-facing messages and errorstopic: rewriterelated to the assertion rewrite mechanismtype: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions