Skip to content

Commit 53c0693

Browse files
authored
Merge pull request #87 from simpar1471/main
Prevent error when all failed `autotest` checks were of type `"no_test"` - thanks @simpar1471 for the improvements!
2 parents 7f76988 + f93ef5f commit 53c0693

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

R/autotest-functions.R

+9-3
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,16 @@ autotest_single_yaml <- function (yaml = NULL,
159159
reports <- reports [which (!duplicated (reports)), ]
160160

161161
# rm "no_test" tests switched off from "test_data"
162-
if (test)
163-
reports <- reports [which (!reports$type == "no_test"), ]
162+
if (test) {
163+
no_test <- reports$type == "no_test"
164+
if (all (no_test)) {
165+
reports <- NULL
166+
} else {
167+
reports <- reports [which(!no_test), ]
168+
rownames (reports) <- NULL
169+
}
170+
}
164171

165-
rownames (reports) <- NULL
166172
}
167173

168174
return (reports)

0 commit comments

Comments
 (0)