Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dblodgett-usgs committed Nov 14, 2023
1 parent 9342d62 commit 089d273
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Binary file modified inst/extdata/nhdp_flowline_sample.gpkg
Binary file not shown.
8 changes: 4 additions & 4 deletions tests/testthat/data/geom_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ variables:
geometry_container:node_coordinates = "x_nodes y_nodes" ;
geometry_container:geometry_type = "polygon" ;
geometry_container:node_count = "node_count" ;
geometry_container:part_node_count = "part_node_count" ;
geometry_container:interior_ring = "interior_ring" ;
geometry_container:grid_mapping = "grid_mapping" ;
geometry_container:part_node_count = "part_node_count" ;
int node_count(instance) ;
node_count:long_name = "count of coordinates in each instance geometry" ;
int part_node_count(part) ;
Expand Down Expand Up @@ -256,9 +256,9 @@ variables:
geometry_container:node_coordinates = "x_nodes y_nodes" ;
geometry_container:geometry_type = "polygon" ;
geometry_container:node_count = "node_count" ;
geometry_container:part_node_count = "part_node_count" ;
geometry_container:interior_ring = "interior_ring" ;
geometry_container:grid_mapping = "grid_mapping" ;
geometry_container:part_node_count = "part_node_count" ;
int node_count(instance) ;
node_count:long_name = "count of coordinates in each instance geometry" ;
int part_node_count(part) ;
Expand Down Expand Up @@ -312,9 +312,9 @@ variables:
geometry_container:node_coordinates = "x_nodes y_nodes" ;
geometry_container:geometry_type = "polygon" ;
geometry_container:node_count = "node_count" ;
geometry_container:part_node_count = "part_node_count" ;
geometry_container:interior_ring = "interior_ring" ;
geometry_container:grid_mapping = "grid_mapping" ;
geometry_container:part_node_count = "part_node_count" ;
int node_count(instance) ;
node_count:long_name = "count of coordinates in each instance geometry" ;
int part_node_count(part) ;
Expand Down Expand Up @@ -368,9 +368,9 @@ variables:
geometry_container:node_coordinates = "x_nodes y_nodes" ;
geometry_container:geometry_type = "polygon" ;
geometry_container:node_count = "node_count" ;
geometry_container:part_node_count = "part_node_count" ;
geometry_container:interior_ring = "interior_ring" ;
geometry_container:grid_mapping = "grid_mapping" ;
geometry_container:part_node_count = "part_node_count" ;
int node_count(instance) ;
node_count:long_name = "count of coordinates in each instance geometry" ;
int part_node_count(part) ;
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test_geom_examples.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
context("geom_examples.md")

test_that("create geom_examples.md", {
testthat::skip_on_ci()

geom_examples <- list.files(pattern = "geom_examples.md", full.names = TRUE, recursive = TRUE)

fixtureData <- jsonlite::fromJSON(system.file('extdata/fixture_wkt.json', package = 'ncdfgeom'))
Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/test_poly.R
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,11 @@ test_that("big roundtrip", {
overwrite = TRUE)

sf::st_geometry(climdiv_poly)[[1]] <- sf::st_cast(sf::st_geometry(climdiv_poly)[[1]], "POLYGON")
climdiv_poly <- sf::st_cast(climdiv_poly, "GEOMETRY")

expect_error(write_geometry(out_nc, climdiv_poly, variables = "climdiv_prcp_inches"),
"Found multiple geometry types, only one is supported.")

climdiv_poly <- st_sf(st_cast(climdiv_poly, "MULTIPOLYGON"))
sf::st_geometry(climdiv_poly)[[1]] <- sf::st_cast(sf::st_geometry(climdiv_poly)[[1]], "MULTIPOLYGON")

expect_warning(out_nc <- write_geometry(out_nc, climdiv_poly, variables = "climdiv_prcp_inches"),
"no datum information found assuming WGS84")
Expand Down

0 comments on commit 089d273

Please sign in to comment.