Skip to content

Commit c3318f1

Browse files
committed
mark segfaulting tests
1 parent 04ec9b3 commit c3318f1

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

tests/testthat/test_read.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ test_that("we get a warning when not specifying one of multiple layers", {
174174

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

178180
expect_warning(st_read(system.file("gpkg/nospatial.gpkg", package = "sf")),
179181
"no simple feature geometries present")

tests/testthat/test_tm.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
test_that("st_read and write handle date and time", {
22
Sys.setenv(TZ="") # local time
3-
x = st_sf(a = 1:2, b=c(5.6,3), dt = Sys.Date()+1:2, tm = Sys.time()+2:3,
3+
x = st_sf(a = 1:2, b=c(5.6,3), dt = Sys.Date()+1:2, tm = Sys.time()+2:3,
44
geometry = structure(st_sfc(st_point(c(1,1)), st_point(c(2,2)))))
55
shp <- paste0(tempfile(), ".shp")
66
gpkg <- paste0(tempfile(), ".gpkg")
@@ -11,7 +11,7 @@ test_that("st_read and write handle date and time", {
1111
x2 = st_read(shp[1], quiet = TRUE)
1212
expect_equal(x[-4], x2, check.attributes=FALSE)
1313
# WKT2 CRS do not roundtrip for ESRI Shapefile
14-
14+
1515
st_write(x, gpkg, quiet = TRUE)
1616
x2 = st_read(gpkg, quiet = TRUE)
1717
expect_equal(x[["a"]], x2[["a"]])
@@ -20,18 +20,18 @@ test_that("st_read and write handle date and time", {
2020
expect_equal(x[["tm"]], x2[["tm"]])
2121

2222
Sys.setenv(TZ="UTC") # GMT
23-
x = st_sf(a = 1:2, b=c(5.6,3), dt = Sys.Date()+1:2, tm = Sys.time()+2:3,
23+
x = st_sf(a = 1:2, b=c(5.6,3), dt = Sys.Date()+1:2, tm = Sys.time()+2:3,
2424
geometry = structure(st_sfc(st_point(c(1,1)), st_point(c(2,2)))))
2525
shp <- paste0(tempfile(), ".shp")
2626
gpkg <- paste0(tempfile(), ".gpkg")
27-
27+
2828
st_crs(x) = st_crs("ENGCRS[\"Undefined Cartesian SRS with unknown unit\",EDATUM[\"Unknown engineering datum\"],CS[Cartesian,2],AXIS[\"X\",unspecified,ORDER[1],LENGTHUNIT[\"unknown\",0]],AXIS[\"Y\",unspecified,ORDER[2],LENGTHUNIT[\"unknown\",0]]]")
29-
29+
3030
st_write(x[-4], shp[1], quiet = TRUE)
3131
x2 = st_read(shp[1], quiet = TRUE)
3232
expect_equal(x[-4], x2, check.attributes=FALSE)
3333
# WKT2 CRS do not roundtrip for ESRI Shapefile
34-
34+
3535
st_write(x, gpkg, quiet = TRUE)
3636
x2 = st_read(gpkg, quiet = TRUE)
3737
expect_equal(x[["a"]], x2[["a"]])

tests/testthat/test_write.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ test_that("append errors work", {
148148
})
149149

150150
test_that("non-spatial tables can be written to GPKG; #1345", {
151+
# currently segfaults using the stream interface
152+
skip_if(default_st_read_use_stream())
153+
151154
nc = system.file("gpkg/nc.gpkg", package = "sf")
152155
tf = tempfile(fileext = ".gpkg")
153156
file.copy(nc, tf)

tests/testthat/test_zm_range.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ test_that("transform includes zm in output", {
144144

145145

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

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

0 commit comments

Comments
 (0)