Skip to content

Commit

Permalink
test: load respective libraries 🧪
Browse files Browse the repository at this point in the history
  • Loading branch information
loreabad6 committed Sep 5, 2024
1 parent 503f119 commit 7c4dba6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/test-checks.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library(dplyr)
library(dplyr, warn.conflicts = FALSE)
# group_ids
test_that("passing an sf object without a proper group_id column fails", {
err = "no appropriate `group_id` column found"
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-cubble.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(cubble, warn.conflicts = FALSE)

tab = as_post_table(polygons)
cls_tab = c("post_table", "sf")

Expand Down
5 changes: 5 additions & 0 deletions tests/testthat/test-dplyr.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
library(cubble)
library(dplyr)
suppressPackageStartupMessages(library(sf))
suppressPackageStartupMessages(library(stars))

# post_table
tab = as_post_table(polygons)
cls_tab = c("post_table", "sf")
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-sf.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(sf)

test_that("st_as_sf works as expected", {
expect_snapshot(st_as_sf(as_post_array(polygons)))
expect_snapshot(st_as_sf(as_post_table(polygons)))
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-stars.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
suppressPackageStartupMessages(library(sf))
library(stars)

poly = st_point(c(0.5,0.5)) |>
st_sfc(crs = 4326) |>
Expand Down

0 comments on commit 7c4dba6

Please sign in to comment.