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

Prevent error when all failed autotest checks were of type "no_test" #87

Merged
merged 4 commits into from
Feb 21, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions R/autotest-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,24 @@
reports <- reports [which (!duplicated (reports)), ]

# rm "no_test" tests switched off from "test_data"
if (test)
reports <- reports [which (!reports$type == "no_test"), ]
if (test) {

mpadge marked this conversation as resolved.
Show resolved Hide resolved
no_test <- reports$type == "no_test"

mpadge marked this conversation as resolved.
Show resolved Hide resolved
if (all (no_test)) {

mpadge marked this conversation as resolved.
Show resolved Hide resolved
reports <- NULL

Check warning on line 168 in R/autotest-functions.R

View check run for this annotation

Codecov / codecov/patch

R/autotest-functions.R#L168

Added line #L168 was not covered by tests

mpadge marked this conversation as resolved.
Show resolved Hide resolved
} else {

mpadge marked this conversation as resolved.
Show resolved Hide resolved
reports <- reports [which(!no_test), ]

mpadge marked this conversation as resolved.
Show resolved Hide resolved
rownames (reports) <- NULL

mpadge marked this conversation as resolved.
Show resolved Hide resolved
}

mpadge marked this conversation as resolved.
Show resolved Hide resolved
}

rownames (reports) <- NULL
}

return (reports)
Expand Down
Loading