Skip to content

No obvious way to set self.maxDiff with pytest_django.asserts #1155

Open
@r-thomson

Description

@r-thomson

When using pytest_django.asserts.assertXMLEqual, the diff in the console is truncated, with the following message at the end:

Diff is ### characters long. Set self.maxDiff to None to see it.

It's not obvious to me what the right way to accomplish this with pytest-django is, since the TestCase for these functions is defined internally. Right now I'm just monkeypatching unittest.case.TestCase.maxDiff, but it'd be nice to have an obvious way of doing this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions