Skip to content

No rich diff when running from pytest #43

Description

@dpinol

https://github.com/Solganis/assertpy2#why-fluent-assertions describes that the library shows the path differences in color, but this doesn't happen when using from pytest.

From pytest

from assertpy2 import assert_that
def test():
     assert_that({0: 0}).is_equal_to({0:1})

tests/test_equals.py:2 (test)
def test():
>       assert_that({0: 0}).is_equal_to({0:1})
E       assertpy2.AssertionFailure: Expected <{0: 0}> to be equal to <{0: 1}>, but was not.

Without pytest

from assertpy2 import assert_that
assert_that({0: 0}).is_equal_to({0:1})


E   assertpy2.AssertionFailure: Expected <{0: 0}> to be equal to <{0: 1}>, but was not.
E   diff (dict):
E     0:
E       - 0
E       + 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions