Update test expectations for chk 0.11.0#41
Open
joethorley wants to merge 1 commit into
Open
Conversation
chk 0.11.0 appends the object's actual class to chk_s3_class() errors (e.g. "must inherit from S3 class 'nlist', not S3 class 'numeric'."). Drop the trailing anchor from the expected regexp so it matches both chk 0.10.0 and 0.11.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
joethorley
marked this pull request as ready for review
July 15, 2026 12:10
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.
Closes #40
chk 0.11.0 (about to be submitted to CRAN) improves the error messages from
chk::chk_s3_class()so they also state the object's actual class, e.g.constantsmust inherit from S3 class 'nlist', not S3 class 'numeric'. This broke the anchored expectation in the "test inputs" test intests/testthat/test-simulate.R, which expected the message to end after the class name.This PR drops the trailing
[.]$anchor from the expected regexp so it matches the message prefix under both versions. Verified locally:devtools::test(filter = "simulate")gives FAIL 0, PASS 145, SKIP 2 (console-only skips)So the tests pass with the current CRAN chk as well as with chk 0.11.0 once it reaches CRAN; no need to wait for the chk release to merge.
🤖 Generated with Claude Code