diff --git a/inst/extdata/ADMIN-EXPRESS-COG_3-1__SHP_LAMB93_FXX_2022-04-15.7z b/inst/extdata/ADMIN-EXPRESS-COG_3-1__SHP_LAMB93_FXX_2022-04-15.7z new file mode 100644 index 0000000000000000000000000000000000000000..08de11215df97fac22ac73fc97c4c8ac67899976 Binary files /dev/null and b/inst/extdata/ADMIN-EXPRESS-COG_3-1__SHP_LAMB93_FXX_2022-04-15.7z differ diff --git a/tests/testthat/test_read_with_scheme.R b/tests/testthat/test_read_with_scheme.R index d757ab1d2ecc1fd90d6fbb3e50e7e74f04c44720..b9ed7f15facaa630514a479e21aa62b87586e739 100644 --- a/tests/testthat/test_read_with_scheme.R +++ b/tests/testthat/test_read_with_scheme.R @@ -1,4 +1,4 @@ -skip("To be read again to have test passing and need to have small data.") +#skip("To be read again to have test passing and need to have small data.") test_that("Test read_with_scheme", { @@ -9,7 +9,11 @@ test_that("Test read_with_scheme", ], "geometry") class_solution = c("sf","data.frame") - file_name = system.file("extdata", "mini_admin-express.gpkg", package="floodam.data") + file_name = system.file( + "extdata", + "ADMIN-EXPRESS-COG_3-1__SHP_LAMB93_FXX_2022-04-15.7z", + package="floodam.data" + ) expect_error( read_with_scheme( @@ -17,13 +21,6 @@ test_that("Test read_with_scheme", scheme = scheme_admin_express_3_1 ) ) - expect_error( - read_with_scheme( - x = file_name, - scheme = scheme_bd_topo_3, - layer = "COMMUNE" - ) - ) expect_error( read_with_scheme( @@ -62,11 +59,10 @@ test_that("Test read_with_scheme", ) ) - file_name = system.file("extdata", "mini_admin-express.7z", package="floodam.data") solution = read_with_scheme( x = file_name, scheme = scheme_admin_express_3_1, - layer = "mini_admin-express", + layer = "COMMUNE", type = "shp" ) expect_success( @@ -81,42 +77,5 @@ test_that("Test read_with_scheme", names(solution) ) ) - - file_name = system.file("extdata", "mini_admin-express.7z", package="floodam.data") - solution = read_with_scheme( - x = file_name, - layer = "mini_admin-express", - type = "shp" - ) - expect_success( - expect_identical( - class_solution, - class(solution) - ) - ) - - file_name = system.file("extdata", "mini_admin-express.zip", package="floodam.data") - solution = read_with_scheme( - x = file_name, - layer = "mini_admin-express", - type = "shp" - ) - expect_success( - expect_identical( - class_solution, - class(solution) - ) - ) - - file_name = system.file("extdata", "mini_admin-express.csv", package="floodam.data") - solution = read_with_scheme( - x = file_name - ) - expect_success( - expect_identical( - class_solution[2], - class(solution) - ) - ) } )