Commit ac4faffe authored by Facundo Muñoz's avatar Facundo Muñoz ®️
Browse files

fix test for classes of testdata

parent cdec1a09
......@@ -35,17 +35,12 @@ test_that("load_dir() skips unknnown file formats", {
res <- load_dir(testdata)
test_files <- c("mobility", "points", "points", "raster")
exp_classes <- c("geonetwork", "SpatialPointsDataFrame", "SpatialPointsDataFrame", "RasterLayer")
expect_is(res, "list")
expect_identical(names(res), test_files)
expect_identical(
vapply(res, class, "char")[test_files],
setNames(
c("igraph", "SpatialPointsDataFrame", "SpatialPointsDataFrame", "RasterLayer"),
test_files
)
)
expect_true(all(mapply(inherits, res, exp_classes)))
})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment