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

when accessing property raises an exception #357

Open
keighrim opened this issue Nov 26, 2022 · 1 comment
Open

when accessing property raises an exception #357

keighrim opened this issue Nov 26, 2022 · 1 comment

Comments

@keighrim
Copy link

keighrim commented Nov 26, 2022

Describe the bug
Deepdiff 5.8.1 added support for comparing @property values, but when calling a @property getter raises an exception (for some reason), deepdiff doesn't perform a comparison.

To Reproduce

class A:
    def __init__(self, fname=None):
        self.fname = fname
    @property
    def content(self):
        return open(self.fname).read()
     
print(DeepDiff(A("/not/existing/file"),A("/not/existing/file")))

Expected behavior
deepdiff compares exceptions from two objects and checks if they are the same exception. Or have an option to change the behavior to do so.

@seperman
Copy link
Owner

Hi @keighrim
Thanks for reporting this issue. Somehow I didn't see it until one year later. Better late than never! I will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants