-
Notifications
You must be signed in to change notification settings - Fork 316
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
Skipping overhaul #1761
Skipping overhaul #1761
Conversation
@@ -48,7 +48,7 @@ | |||
#' expect_equal(1, 2) # this one skipped | |||
#' expect_equal(1, 3) # this one is also skipped | |||
#' }) | |||
skip <- function(message) { | |||
skip <- function(message = "Skipping") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love providing a default message, I feel like if you call skip()
then you should justify yourself with a good message
I don't feel extremely strong about this though
R/skip.R
Outdated
if (!has_internet(host)) { | ||
skip("offline") | ||
} else { | ||
invisible() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, but I try to avoid negating the condition when I can.
if (!has_internet(host)) { | |
skip("offline") | |
} else { | |
invisible() | |
} | |
if (has_internet(host)) { | |
invisible() | |
} else { | |
skip("offline") | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we already have the skip_if()
and skip_if_not()
helpers that do this, I just refactored to use them in more places.
Co-authored-by: Davis Vaughan <davis@rstudio.com>
IS_BIOC_BUILD_MACHINE
forskip_on_bioc()
. Fixes UseIS_BIOC_BUILD_MACHINE
rather thanBBS_HOME
inskip_on_bioc()
#1712.skip()
gains default message. Fixesskip()
withoutmessage
#1586local_mocked_bindings()
.@DavisVaughan @jennybc no need for a detailed review, but I'd love your thoughts on how the tests look now, and if you see any other obvious low hanging fruit.