Test upkeep - #135
Open
hadley wants to merge 1 commit into
Open
Conversation
* Convert to testthat 3e * Switch to parallel testing (~170s -> ~60s) * Don't change global state in `helpers.R` * Add new `local_` helpers to quiet all output * Add `add = TRUE` to bare `on.exit()` calls
Member
|
thanks a lot |
VincentGuyader
added a commit
that referenced
this pull request
Aug 8, 2026
The archival trigger is not Fedora specific. CRAN reports ERROR on the four
r-devel Linux flavors (debian and fedora, clang and gcc), on
r-patched-linux-x86_64, on r-release-windows-x86_64 and on
r-oldrel-windows-x86_64, that is on every flavor that has already picked up
roxygen2 8.x. cran-comments.md and NEWS.md both claimed the failure was
limited to the r-devel Fedora flavors.
After the win-builder fix, the first assertion of test-roxygen2-8x-compat.R
could no longer fail for the reason it exists: both roxygen2 lines satisfy
`any(has_fields(c("RoxygenNote", "Config/roxygen2/version")))`, so the guard
verified nothing on any flavor. A new test writes the post-8.x DESCRIPTION
shape by hand (RoxygenNote deleted, Config/roxygen2/version set) and asserts
find_missing_tags() still classifies the fixture, which exercises the exact
broken state everywhere instead of only where the scaffolding toolchain
happens to migrate. The existing test now also asserts that a migrated
DESCRIPTION carries the new field alone.
Config/testthat/parallel arrived with #135 and was not disclosed in this
branch's housekeeping list. It buys nothing on CRAN, where testthat caps at
two workers, and adds a flakiness surface while the package sits under an
archival deadline. Measured cost of running serially: 324s against 233s.
Config/testthat/edition 3, also new with #135, is kept: the rewrites from
`out <- expect_message(f())` to `expect_message(out <- f())` that it requires
are correct and necessary, since edition 3 returns the condition rather than
the value.
Also guard create_example_pkg()'s own example with the same requireNamespace()
pair as the three examples this branch unwrapped from \dontrun{}, move the
CONTRIBUTING.md roxygen2 floor from the stale `> 7.1.2` to `>= 7.3.0` to match
Imports and test-requirements.R, and teach .Rbuildignore to drop *.stackdump:
a Git Bash crash file landing at the repository root is shipped by R CMD build
and raises a "Non-standard file/directory found at top level" NOTE.
Verified on the result: R CMD check --as-cran is Status OK with 0 failures,
601 passing assertions and 8 skips, run once under roxygen2 7.3.3 and once
under roxygen2 8.1.0 in an isolated library.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
helpers.Rlocal_helpers to quiet all outputadd = TRUEto bareon.exit()callsI made this because checkhelper fails with the latest version of roxygen2 (just released) to CRAN and I found it very hard to figure out the problem. Hopefully this will help you diagnose it.