Skip to content

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

Closed
@jlaba

Description

@jlaba

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions