-
Notifications
You must be signed in to change notification settings - Fork 758
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
make exit conditions from running test_dir() explicit #2099
Conversation
I think we can just call it with |
Sorry, could you elaborate Jim? What do you think should be changed? My PR does propose calling |
R/test.R
Outdated
|
||
testthat_args <- list(test_path, filter = filter, env = env, ... = ...) | ||
testthat_args <- list(test_path, filter = filter, env = env, stop_on_failure = stop_on_failure, ... = ...) |
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 think this can just be
testthat_args <- list(test_path, filter = filter, env = env, stop_on_failure = FALSE, ... = ...)
and I think you can remove the comment.
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.
ha oh ok, got it! Was trying to be consistent with how you handle env
. I can update it to just add this argument.
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.
ok changed this in a215003. I also rebased this PR to the most recent state of master
I don't think the CI failures (specifically Travis) are a result of my PR here. I see this in the logs during setup
|
Thanks for this great package!
I'd like to recommend a small (non-user-facing) change following the discussion in r-lib/testthat#912. Currently,
devtools::test()
implicitly relies on the fact that the default for argumentstop_on_failure
intestthat::test_dir()
isFALSE
.The default behavior of
devtools::test()
is to return successfully if any tests fail, e.g.Rscript -e "devtools::test()"
will return exit code0
if you have failing tests.Since
stop_on_failure
intestthat::test_dir()
so meaningfully determines the behavior ofdevtools::test()
, I think it would be valuable to supplystop_on_failure = FALSE
explicitly in calls made bydevtools
.I hope you'll consider this PR. Thanks!