From f861d013b5755e1449b9c9c2325f811d7e9fb73c Mon Sep 17 00:00:00 2001 From: Renata Diaz Date: Wed, 14 Apr 2021 15:43:08 -0400 Subject: [PATCH] don't forget to save --- tests/testthat/test04_sample_fs.R | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/testthat/test04_sample_fs.R b/tests/testthat/test04_sample_fs.R index 735778a..1e0227b 100644 --- a/tests/testthat/test04_sample_fs.R +++ b/tests/testthat/test04_sample_fs.R @@ -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))) })