You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As currently written, test-custom_functions.R is partially testing that the underlying sf object never changes. Specifically, the expect_identical() here (second to last) will throw errors if sf ever changes the attributes attached to sf objects:
I believe this test is looking to confirm that the ID and paths of these two objects are equal to each other. Would it be possible to change this test to expect_equal() with the check.attributes argument set to FALSE?
This change would mean this package is no longer blocking sf from making changes to the internal structure of sf objects, and would fix the immediate issue with the new attribute.
If you're open to it, I'd be happy to send you a PR to make these changes!
The text was updated successfully, but these errors were encountered:
Hi there!
As currently written,
test-custom_functions.R
is partially testing that the underlying sf object never changes. Specifically, theexpect_identical()
here (second to last) will throw errors if sf ever changes the attributes attached to sf objects:h3jsr/tests/testthat/test_custom_functions.R
Lines 35 to 54 in 9ee5b62
The issue is that by using
expect_identical()
, testthat is partially testing if your objects contain exactly the same attributes. Because you're comparing against old saved sf objects, that means you're partially testing internal implementation details of the sf object that aren't guaranteed to remain the same over time. There's a bit more about how testing the attributes of objects created by other packages can be a problem on the Tidyverse blog.At the moment, we're trying to add a new attribute to sf objects, which causes these tests to error. I'm writing to ask if you'd consider changing these tests to allow sf to improve the internal structure of sf objects.
I believe this test is looking to confirm that the ID and paths of these two objects are equal to each other. Would it be possible to change this test to
expect_equal()
with thecheck.attributes
argument set toFALSE
?This change would mean this package is no longer blocking sf from making changes to the internal structure of sf objects, and would fix the immediate issue with the new attribute.
If you're open to it, I'd be happy to send you a PR to make these changes!
The text was updated successfully, but these errors were encountered: