Skip to content

Commit

Permalink
updates tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nowosad committed Apr 2, 2024
1 parent b676201 commit 4f4b113
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-supercells-v1.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ v1_f = supercells(v1, 100, compactness = 1, avg_fun = mean)
test_that("supercells works for 1 var", {
expect_equal(ncol(v1_a), 5)
expect_equal(ncol(v1_a), ncol(v1_b))
expect_equal(nrow(v1_a), 92)
expect_equal(nrow(v1_a), 90)
expect_equal(nrow(v1_b), 88)
expect_equal(nrow(v1_e), 88)
expect_equal(v1_a, v1_c)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-supercells-v3.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ v3_b = supercells(v3, 100, compactness = 1, transform = "to_LAB")

test_that("supercells works for 3 var", {
expect_equal(ncol(v3_a), 7)
expect_equal(nrow(v3_a), 83)
expect_equal(nrow(v3_b), 93)
expect_equal(nrow(v3_a), 80)
expect_equal(nrow(v3_b), 86)
expect_equal(as.numeric(sf::st_bbox(v3_a)), unname(as.vector(terra::ext(v3)))[c(1, 3, 2, 4)])
})

0 comments on commit 4f4b113

Please sign in to comment.