Skip to content

Commit

Permalink
Merge pull request #87 from simpar1471/main
Browse files Browse the repository at this point in the history
Prevent error when all failed `autotest` checks were of type `"no_test"` - thanks @simpar1471 for the improvements!
  • Loading branch information
mpadge committed Feb 21, 2024
2 parents 7f76988 + f93ef5f commit 53c0693
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions R/autotest-functions.R
Expand Up @@ -159,10 +159,16 @@ autotest_single_yaml <- function (yaml = NULL,
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) {
no_test <- reports$type == "no_test"
if (all (no_test)) {
reports <- NULL
} else {
reports <- reports [which(!no_test), ]
rownames (reports) <- NULL
}
}

rownames (reports) <- NULL
}

return (reports)
Expand Down

0 comments on commit 53c0693

Please sign in to comment.