-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
Check equality of precompiled regex patterns #336
Comments
@cohml |
Thanks for the prompt reply @seperman. I will definitely check this issue out in the near future if I too can find the time. It is near and dear to my heart 😉 |
@seperman Is this issue still unresolved? If so, can you:
Thanks! |
Hi @cohml You can add an if condition that checks whether We should also make sure that the Delta object will be able to reproduce these changes: |
@cohml Thanks for taking care of this ticket. |
DeepDiff
does not currently seem able to detect differences between precompiled regex patterns.I'm not sure if this behavior is unintended (then it's a bug) or not (then it's a feature request). The docs don't seem to reference it. Either way, the output above certainly is not what you'd expect.
Note that regular
assert
appears able to detect this difference just fine:Tested using:
At a minimum,
DeepDiff
should return information on how the patterns themselves differ, akin to the following comparison:Ideally, it would also be great if all attributes of the two
Pattern
objects could be compared, such as their flags. This may be more challenging, though.The text was updated successfully, but these errors were encountered: