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

exclude_regex_paths is not longer working with default threshold_to_diff_deeper #487

Open
wreggyl opened this issue Sep 17, 2024 · 0 comments

Comments

@wreggyl
Copy link

wreggyl commented Sep 17, 2024

Describe the bug
The exclude_regex_paths is not working if the keys are different and would be filtered out. Only working if the threshold_to_diff_deeper is set to 0

To Reproduce
t1 = {'a': [1, 2, [3, {'foo1': 'bar'}]]}
t2 = {'a': [1, 2, [3, {'foo2': 'bar'}]]}
diff = deepdiff.DeepDiff(t1, t2, exclude_regex_paths="['foo.']")

Expected behavior
Diff is expected to be empty

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

  • OS: [MAC OS, Windows]
  • Version [14.6.1, 11]
  • Python Version [3.12, 3.9.2]
  • DeepDiff Version [8.0.1]

Additional context
Example from:
https://zepworks.com/deepdiff/current/exclude_paths.html
diff = deepdiff.DeepDiff(t1, t2, exclude_regex_paths="['foo.']", threshold_to_diff_deeper=0) is working and produces empty diff

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