ropensci-archive / scrubr

:warning: ARCHIVED :warning: Clean species occurrence records
Other
34 stars 10 forks source link

Test failure with the development version of tibble #37

Closed krlmlr closed 2 years ago

krlmlr commented 3 years ago

It looks like the tests in this package are sensitive to the order of the attributes() in a tibble object, which has changed in tibble 3.1.4. Can you please confirm?

testthat::expect_equal() and testthat::expect_identical() handle this case automatically, but must be applied on the entire object.

testthat::expect_equal(
  attributes(structure(list(), a = 1, b = 2)),
  attributes(structure(list(), b = 2, a = 1))
)
#> Error: attributes(structure(list(), a = 1, b = 2)) not equal to attributes(structure(list(), b = 2, a = 1)).
#> Names: 2 string mismatches
#> Component 1: Mean relative difference: 1
#> Component 2: Mean relative difference: 0.5
testthat::expect_equal(
  structure(list(), a = 1, b = 2),
  structure(list(), b = 2, a = 1)
)

Created on 2021-08-15 by the reprex package (v2.0.1)

maelle commented 2 years ago

This repository is about to be archived (and the package was archived on CRAN).