Skip to content

Commit

Permalink
Merge branch 'main' into test-coverage-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Sep 29, 2023
2 parents 0481828 + be1fc31 commit cb35bda
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 10 deletions.
14 changes: 14 additions & 0 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,17 @@ I don't know of any major outstanding issues in devtools itself.
The package development cheatsheet likely needs a major overhaul to account for much more functionality in usethis and the current state of devtools. https://github.com/r-lib/devtools/issues/2107

Should devtools be converted to use pak for installation, or should the installation commands be deprecated in devtools and users suggested to use pak directly?

## R CMD check notes

devtools has some vintage tests around `.Rnw` vignettes.
It's not clear if it makes sense to keep these, but I (jennybc) am not rushing to remove these tests.
Since I inherited the maintainership of devtools, I have not pursued why 2 of these tests fail locally (they are skipped on GHA).
However, today, I did sort it out and want to record what I did.
In case it comes up in the future, this caused the necessary LaTeX package to be installed:

``` r
tinytex::parse_install(
text = "! LaTeX Error: File `grfext.sty' not found."
)
```
2 changes: 1 addition & 1 deletion man/load_all.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 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(devtools)

Expand Down
10 changes: 6 additions & 4 deletions tests/testthat/test-check.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
test_that("can determine when to document", {
expect_false(can_document(list()))
# TODO: switch to expect_snapshot()
suppressMessages(expect_message(
expect_false(can_document(list(roxygennote = "15.0.00"))),
"doesn't match required"
))
expect_output(
expect_message(
expect_false(can_document(list(roxygennote = "15.0.00"))),
"doesn't match required"
)
)
expect_true(can_document(list(roxygennote = packageVersion("roxygen2"))))
})

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-test.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test_that("TESTTHAT_PKG environment variable is set", {
filter = "envvar",
stop_on_failure = TRUE
)
test_active_file(
test_test_active_file(
test_path("testTest/tests/testthat/test-envvar.R"),
stop_on_failure = TRUE
)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/testVignettes/vignettes/new.Rnw
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\documentclass[oneside]{article}
\documentclass{article}

\begin{document}
Test
\end{document}
\end{document}
4 changes: 2 additions & 2 deletions tests/testthat/testVignettesBuilt/vignettes/new.Rnw
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
%\VignetteIndexEntry{New}

\documentclass[oneside]{article}
\documentclass{article}
\begin{document}

<<>>=
library(testVignettesBuilt)
function_with_unusual_name()
@

\end{document}
\end{document}

0 comments on commit cb35bda

Please sign in to comment.