Skip to content

Commit

Permalink
Do not error on innocuous warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Dec 10, 2024
1 parent c8fba7e commit 773839c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# This file is part of the standard setup for testthat.
# It is recommended that you do not modify it.
#
# Where should you do additional test configuration?
# Learn more about the roles of various files in:
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
# * https://testthat.r-lib.org/articles/special-files.html

library(testthat)
library(linelist)

test_df <- as.data.frame(test_check("linelist"))

if (any(test_df$warning > 0) && !identical(Sys.getenv("NOT_CRAN"), "TRUE")) {
stop("tests failed with warnings", call. = FALSE)
}
test_check("linelist", stop_on_warning = FALSE)

0 comments on commit 773839c

Please sign in to comment.