-
Notifications
You must be signed in to change notification settings - Fork 5
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
Prevent error when all failed autotest
checks were of type "no_test"
#87
Merged
Conversation
This file contains 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
… `reports` were not to be tested then the returned value of 'reports' was a data frame with 0 rows, instead of `NULL`. When `res` in `autotest_package()` is a data frame with 0 rows, `order_at_rows` experiences an error.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #87 +/- ##
==========================================
- Coverage 78.44% 78.43% -0.01%
==========================================
Files 29 29
Lines 4319 4322 +3
==========================================
+ Hits 3388 3390 +2
- Misses 931 932 +1 ☔ View full report in Codecov by Sentry. |
mpadge
reviewed
Feb 21, 2024
mpadge
reviewed
Feb 21, 2024
mpadge
reviewed
Feb 21, 2024
mpadge
reviewed
Feb 21, 2024
mpadge
reviewed
Feb 21, 2024
mpadge
reviewed
Feb 21, 2024
mpadge
reviewed
Feb 21, 2024
mpadge
reviewed
Feb 21, 2024
mpadge
approved these changes
Feb 21, 2024
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.
The issue
In
autotest_single_yaml()
, there is a mechanism which checks whether failed tests were meant to be run. This looked like this:This is great when some or all elements in
!reports$type == "no_test"
areTRUE
- thereports
data frame is cut down to not include any tests which failed but weren't meant to be tested anyway.In situations where all values in
!reports$type == "no_test"
areFALSE
, the subsetting procedure makes a data frame with 0 rows and 10 columns. This empty data frame causes an error to be thrown later inautotest
'sorder_at_rows
function:The fix
To prevent this error I've added some logic which, in
autotest_single_yaml()
, setsreports
back toNULL
ifall(!reports$type == "no_test")
isTRUE
.Checks on local machine
I don't think I've broken anything that wasn't leading to warnings already.