constructive icon indicating copy to clipboard operation
constructive copied to clipboard

implement compare_proxy method for "python.builtin.object"

Open moodymudskipper opened this issue 7 months ago • 0 comments

After #527

Because "python.builtin.object" objects contain pointers, waldo::compare(x, y) signals a difference even when x and y are equivalent.

We can define methods for waldo:: compare_proxy() to edit the object before comparison. This is used for data.table for instance as you can see in waldo:::compare_proxy.data.table().

constructive uses this, defining these methods just during the checks. Lookup compare_proxy and implement similar code that coverts the object using reticulate::py_to_r() on the object.

Verify that construct(r_to_py(1:3)) doesn't signal inconsistencies anymore

moodymudskipper avatar Mar 14 '25 16:03 moodymudskipper