Skip to content

Commit

Permalink
mark segfaulting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Dec 14, 2022
1 parent d7a3cd5 commit 1479f5a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/testthat/test_read.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ test_that("we get a warning when not specifying one of multiple layers", {

test_that("reading non-spatial table works", {
skip_if_not(sf_extSoftVersion()[["GDAL"]] >= "2.2.0") # error on OSX for 2.1.3
# currently segfaults using the stream interface
skip_if(default_st_read_use_stream())

expect_warning(st_read(system.file("gpkg/nospatial.gpkg", package = "sf")),
"no simple feature geometries present")
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test_sp.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ test_that("Can convert `XY` objects to sp", {
test_that("Can't convert `M` dimension to sp", {
skip_if_not_installed("sp")
skip_if_not(sf_extSoftVersion()[["GDAL"]] >= "2.1.0")
# currently segfaults using the stream interface
skip_if(default_st_read_use_stream())
x <- read_sf(system.file("shape/storms_xyzm_feature.shp", package = "sf"), quiet = TRUE)
expect_error(as_Spatial(x), "not supported by sp")
})
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test_tm.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
context("sf: date and time")

test_that("st_read and write handle date and time", {
# currently segfaults using the stream interface
skip_if(default_st_read_use_stream())

Sys.setenv(TZ="") # local time
x = st_sf(a = 1:2, b=c(5.6,3), dt = Sys.Date()+1:2, tm = Sys.time()+2:3,
geometry = structure(st_sfc(st_point(c(1,1)), st_point(c(2,2)))))
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test_write.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ test_that("append errors work", {
})

test_that("non-spatial tables can be written to GPKG; #1345", {
# currently segfaults using the stream interface
skip_if(default_st_read_use_stream())

nc = system.file("gpkg/nc.gpkg", package = "sf")
tf = tempfile(fileext = ".gpkg")
file.copy(nc, tf)
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test_zm_range.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ test_that("transform includes zm in output", {


test_that("XYM-only objects correctly calculate M (and not Z)", {
# currently segfaults using the stream interface
skip_if(default_st_read_use_stream())

skip_if_not(sf_extSoftVersion()["GDAL"] > "2.1.0")

Expand Down

0 comments on commit 1479f5a

Please sign in to comment.