Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Chantel Wetzel committed May 17, 2024
1 parent aed4920 commit ba88e91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/testthat/test-comps.R
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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,
Expand All @@ -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)]) )

})

0 comments on commit ba88e91

Please sign in to comment.