diff --git a/tests/testthat/test-comps.R b/tests/testthat/test-comps.R index 2e74469..e722746 100644 --- a/tests/testthat/test-comps.R +++ b/tests/testthat/test-comps.R @@ -7,7 +7,6 @@ set.seed(1) test_that("get_raw_comps", { skip_on_cran() - set.seed(123) dat <- pull_bio( common_name = "lingcod", years = c(2003, 2018), @@ -22,7 +21,7 @@ test_that("get_raw_comps", { expect_equal(nrow(length_comps$sexed), 16) expect_equal( sum(length_comps$sexed$nsamp), sum(length_comps$sexed[, 7:ncol(length_comps$sexed)])) expect_equal(nrow(length_comps$unsexed), 16) - expect_equal( sum(length_comps$unsexed$nsamp), sum(length_comps$unsexed[, 7:ncol(length_comps$unsexed)]) / 2) + expect_equal( sum(length_comps$unsexed$nsamp), sum(length_comps$unsexed[, 7:ncol(length_comps$unsexed)]) ) length_unsexed_comps <- get_raw_comps( data = dat, @@ -40,6 +39,6 @@ test_that("get_raw_comps", { expect_equal(nrow(age_comps$sexed), 16) expect_equal( sum(age_comps$sexed$nsamp), sum(age_comps$sexed[, 10:ncol(age_comps$sexed)])) expect_equal(nrow(age_comps$unsexed), 16) - expect_equal( sum(age_comps$unsexed$nsamp), sum(age_comps$unsexed[, 10:ncol(age_comps$unsexed)]) / 2) + expect_equal( sum(age_comps$unsexed$nsamp), sum(age_comps$unsexed[, 10:ncol(age_comps$unsexed)]) ) })