Skip to content

Make tests robust to exact phrasing & language of base condition messages#6029

Merged
MichaelChirico merged 7 commits intomasterfrom
robust-base-msg
Apr 3, 2024
Merged

Make tests robust to exact phrasing & language of base condition messages#6029
MichaelChirico merged 7 commits intomasterfrom
robust-base-msg

Conversation

@MichaelChirico
Copy link
Copy Markdown
Member

@MichaelChirico MichaelChirico commented Mar 28, 2024

Closes #4789

@MichaelChirico MichaelChirico added tests translation issues/PRs related to message translation projects labels Mar 28, 2024
@MichaelChirico MichaelChirico marked this pull request as draft March 28, 2024 06:57
@MichaelChirico MichaelChirico added this to the 1.16.0 milestone Mar 28, 2024
@MichaelChirico MichaelChirico marked this pull request as ready for review March 29, 2024 00:24
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.53%. Comparing base (7fbc314) to head (45bfbd0).

❗ Current head 45bfbd0 differs from pull request most recent head 466a539. Consider uploading reports for the commit 466a539 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6029      +/-   ##
==========================================
- Coverage   97.53%   97.53%   -0.01%     
==========================================
  Files          80       80              
  Lines       14916    14915       -1     
==========================================
- Hits        14548    14547       -1     
  Misses        368      368              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MichaelChirico MichaelChirico requested a review from tdhock April 3, 2024 20:56
Copy link
Copy Markdown
Member

@tdhock tdhock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems reasonable. not sure how often base R would make a change to its messages?
at least this refactoring makes it clear in our test file which error messages are from us, and which are from base R.

@MichaelChirico
Copy link
Copy Markdown
Member Author

not sure how often base R would make a change to its messages?

not terribly often, but it's no fun to get kicked off CRAN for it when it does happen, as I just dealt with in a patch release for {lintr}.

it's also a better testing practice in principle: only directly test the code we own, though as seen it's a bit more tedious to design the tests & slightly cumbersome to avoid regression. on balance I think avoiding CRAN issues is worth these overheads which can themselves be mitigated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests translation issues/PRs related to message translation projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

review and relax test strings on R messages

2 participants