Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increasing Testing Coverage (revision) #366

Merged
merged 2 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/pk.calc.all.R
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ pk.nca.interval <- function(conc, time, volume, duration.conc,
all_intervals <- get.interval.cols()
# Set the dose to NA if its length is zero
if (length(dose) == 0) {
stop("Please report a bug. Length of dose should not be zero.")
stop("Please report a bug. Length of dose should not be zero.") # nocov
}
# Make sure that we calculate all of the dependencies. Do this in
# reverse order for dependencies of dependencies.
Expand Down
6 changes: 6 additions & 0 deletions tests/testthat/test-time.to.steady.state.R
Original file line number Diff line number Diff line change
Expand Up @@ -750,3 +750,9 @@ test_that("tss Monoexponential no models converged", {
expect_warning(pk.tss.monoexponential.population(data = bad_data, output = "population"),
regexp = "No population model for monoexponential Tss converged, no results given")
})

test_that("tss Monoexponential no models converged with verbose = TRUE", {
bad_data <- data.frame(subject=rep(1:2, each = 4), time=0, conc=0, tss.constant=0.9)
expect_warning(pk.tss.monoexponential.population(data = bad_data, output = "population", verbose = TRUE),
regexp = "No population model for monoexponential Tss converged, no results given")
})
Loading