Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to ensure test(number instead of test(name #6041

Merged
merged 8 commits into from
Apr 9, 2024

Conversation

MichaelChirico
Copy link
Member

@MichaelChirico MichaelChirico commented Apr 1, 2024

Related to #6040 -- it will be good to keep to a pattern where test() always has a numeric literal in the num= argument, even if it's a dynamic test where the base number is incremented by a variable amount. Doing so will make the testPattern= argument to test.data.table() more usable.

We can add a linter for this (#5908) to prevent regression later.

Linter to find these:

l=make_linter_from_xpath(
  "//SYMBOL_FUNCTION_CALL[text() = 'test']/parent::expr/following-sibling::expr[1][SYMBOL or expr[1]/SYMBOL]",
  "xxx")
lint("inst/tests/tests.Rraw", l())

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.53%. Comparing base (898dce3) to head (3daf44d).
Report is 4 commits behind head on master.

❗ Current head 3daf44d differs from pull request most recent head a21e48d. Consider uploading reports for the commit a21e48d to get more accurate results

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

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

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @MichaelChirico and the rest of your teammates on Graphite Graphite

@MichaelChirico MichaelChirico merged commit ac60ca2 into master Apr 9, 2024
3 checks passed
@jangorecki jangorecki deleted the test-numbering branch April 9, 2024 20:06
MichaelChirico added a commit that referenced this pull request May 4, 2024
This is a follow-up to #6041 that will prevent regression on that front going forward.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants