Skip to content

deepdiff diff error when i haved set a custom iterable_compare_func #469

@leoxile

Description

@leoxile

Please checkout the F.A.Q page before creating a bug ticket to make sure it is not already addressed.

Describe the bug
A clear and concise description of what the bug is.
after i set a custom iterable_compare_func, it will stop diff x and y , even if the x is not equal to y, it will throw it into the 'iterable_item_removed' type
you can seed code position in the image uploaded. the if condition is not expected.
oh. i can't upload image, the code is in line
'''
if (i != j and ((x == y) or self.iterable_compare_func)):
'''

_diff_by_forming_pairs_and_comparing_one_by_one, diff.py:871
_diff_iterable_in_order, diff.py:792
_diff_iterable, diff.py:663
_diff, diff.py:1577
init, diff.py:320
, diff.py:1360

To Reproduce
Steps to reproduce the behavior

Expected behavior
A clear and concise description of what you expected to happen.

it should only compare x == y rather than ((x == y) or self.iterable_compare_func)

OS, DeepDiff version and Python version (please complete the following information):

  • OS: macos
  • deepdiff version:6.7.1

Additional context
Add any other context about the problem here.

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