Skip to content

Commit

Permalink
don't forget to save
Browse files Browse the repository at this point in the history
  • Loading branch information
diazrenata committed Apr 14, 2021
1 parent 6db28a1 commit f861d01
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/testthat/test04_sample_fs.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,22 @@ test_that("sampling edge case fxns work", {

dat <- NULL

p_table <- readRDS(here::here("masterp_mamm.Rds"))
expect_true(is.na(sample_fs_wrapper(dat, "1002", FALSE, 10, p_table = p_table)))
expect_true(is.na(sample_fs(dat, nsamples = 10, p_table = p_table)))
expect_true(is.na(sample_fs_wrapper(dat, "1002", FALSE, 10, p_table = NULL)))
expect_true(is.na(sample_fs(dat, nsamples = 10, p_table = NULL)))

dat <- load_dataset("mcdb")
dat <- dat %>%
dplyr::filter(site == "I am not a site")

expect_true(is.na(sample_fs_wrapper(dat, "1002", FALSE, 10, p_table = p_table)))
expect_true(is.na(sample_fs(dat, nsamples = 10, p_table = p_table)))
expect_true(is.na(sample_fs_wrapper(dat, "1002", FALSE, 10, p_table = NULL)))
expect_true(is.na(sample_fs(dat, nsamples = 10, p_table = NULL)))

dat <- load_dataset("mcdb")
dat <- dat %>%
dplyr::filter(site == "1003")
expect_true(is.na(sample_fs_wrapper(dat, "1002", FALSE, 10, p_table = p_table)))
expect_true(is.na(sample_fs_wrapper(dat, "1002", FALSE, 10, p_table = NULL)))

expect_true(is.data.frame(sample_fs_wrapper(dat, site_name = "1003", singletonsyn = FALSE, n_samples = 10, p_table = p_table)))
expect_true(is.data.frame(sample_fs_wrapper(dat, site_name = "1003", singletonsyn = FALSE, n_samples = 10, p_table = NULL)))


})

0 comments on commit f861d01

Please sign in to comment.