Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deepdiff with include-paths is changing results, if a not considered path changes #493

Open
jlaba opened this issue Oct 10, 2024 · 0 comments

Comments

@jlaba
Copy link

jlaba commented Oct 10, 2024

Comparing some paths of two dicts with deepdiff the results differ, depending on the presence or absence of other "not included" paths (see also Stackoverflow question).

from deepdiff import DeepDiff
DeepDiff(
    {
        'name': 'Testname',
        'code': 'bla',
        'noneCode': 'blu',
    }, {
        'uid': '12345',
        'name': 'Testname',
    },
    include_paths = "root['name']"
) # expected to be {}, but detects a change

DeepDiff(
    {
        'name': 'Testname',
        'code': 'bla',
    }, {
        'uid': '12345',
        'name': 'Testname',
    },
    include_paths = "root['name']"
) # expected to be {} and is {}

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

  • OS: OpenSuSe Leap 15.6 as well as Windows 11
  • Python Version 3.10 (on linux), 3.11 (on windows)
  • DeepDiff Version 8.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant