deepdiff icon indicating copy to clipboard operation
deepdiff copied to clipboard

when accessing property raises an exception

Open keighrim opened this issue 2 years ago • 1 comments

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.

keighrim avatar Nov 26 '22 19:11 keighrim

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.

seperman avatar Nov 20 '23 01:11 seperman