-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
options for strict tests; few enhancements (#626)
- part of insightsengineering/coredev-tasks#498 - part of insightsengineering/coredev-tasks#478 - please read this for more info about the implementation: insightsengineering/coredev-tasks#478 (comment) - removed `pkg::` from examples for packages in Depends - reoredered rd tags to have examples at the bottom - fix roxygen warning about documenting package level Rd file - removed `# nolint` from code-docs (e.g. examples or knitr chunks) (this is actually rendered!). I needed to put a higher level exclusion in the top `.lintr` file. This is of course more powerful than single line (or code-bloc) exclusions - reviewed `dontrun{}` - removed `teal.modules.general::` from examples and vignettes as this is actually redundant here Please review the changes carefully and let me know if there is something you don't like. --------- Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: vedhav <[email protected]> Co-authored-by: Vedha Viyash <[email protected]>
- Loading branch information
1 parent
dff3e33
commit 18978fb
Showing
5 changed files
with
33 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
logger::log_appender(function(...) NULL, namespace = "teal.modules.general") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# `opts_partial_match_old` is left for exclusions due to partial matching in dependent packages (i.e. not fixable here) | ||
# it might happen that it is not used right now, but it is left for possible future use | ||
# use with: `withr::with_options(opts_partial_match_old, { ... })` inside the test | ||
opts_partial_match_old <- list( | ||
warnPartialMatchDollar = getOption("warnPartialMatchDollar"), | ||
warnPartialMatchArgs = getOption("warnPartialMatchArgs"), | ||
warnPartialMatchAttr = getOption("warnPartialMatchAttr") | ||
) | ||
opts_partial_match_new <- list( | ||
warnPartialMatchDollar = TRUE, | ||
warnPartialMatchArgs = TRUE, | ||
warnPartialMatchAttr = TRUE | ||
) | ||
|
||
if (isFALSE(getFromNamespace("on_cran", "testthat")()) && requireNamespace("withr", quietly = TRUE)) { | ||
withr::local_options( | ||
opts_partial_match_new, | ||
.local_envir = testthat::teardown_env() | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters