Skip to content

Commit

Permalink
testing without rare
Browse files Browse the repository at this point in the history
  • Loading branch information
wcornwell committed Nov 18, 2024
1 parent 2389efb commit 8a8782f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
^\.github$
^LICENSE\.md$
^\.DS_Store$
^\README.Rmd$
^README\.Rmd$
10 changes: 7 additions & 3 deletions tests/testthat/test-test_spectral.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ test_that("calculate_spectral_metrics works", {
wavelengths = c('blue','green','red','red_edge','nir'),
rarefaction = TRUE, min_points = 100, n = 20)
expect_type(spectral_metrics,"list")
expect_true(all(spectral_metrics$CV<10))
expect_true(all(spectral_metrics$SV<0.42))
expect_true(all(spectral_metrics$CHV_nopca<10))
expect_true(all(spectral_metrics$CV<1))
expect_true(all(spectral_metrics$SV<0.5))
expect_true(all(spectral_metrics$CHV_nopca<0.4))
expect_true(all(spectral_metrics$aoi_id==1))
expect_true(all(spectral_metrics$image_type=='masked'))
spectral_metrics_no_rare <- calculate_spectral_metrics(df,
wavelengths = c('blue','green','red','red_edge','nir'),
rarefaction = FALSE, min_points = 100, n = 20)
expect_type(spectral_metrics_no_rare,"list")
})

test_that("extract_pixel_values works", {
Expand Down

0 comments on commit 8a8782f

Please sign in to comment.