You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run interactively or via test_file this produces does not print a message to screen 0.7/0.8, but does on 0.9 (and current github).
library(testthat)
f<-function(x) {
message("I used to be hidden")
x
}
test_that("foo", {
expect_equal(f(1), 1)
})
Run outside of a test_that block, the message is displayed on all versions (0.7-current).
expect_equal(f(1), 1)
The message printing messes up the output when running a big block of tests that produce a lot of messages as messages are interspersed through all the progress dots.
I believe this was incorporated in 2a60cc9, because prior to that, because this block suppresses messages while this block does not. I can't see where in the nested tryCatch/withCallingHandlers that a suppressMessages would go now (or the magic incantation to get invokeRestart("muffleMessage") to work).
Output of sessionInfo:
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)
locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] testthat_0.9.1.9000
loaded via a namespace (and not attached):
[1] devtools_1.5 digest_0.6.4 evaluate_0.5.5 httr_0.3 memoise_0.2.1
[6] parallel_3.1.1 RCurl_1.95-4.3 stringr_0.6.2 tools_3.1.1 whisker_0.3-2
The text was updated successfully, but these errors were encountered:
Minimal example:
Run interactively or via
test_file
this produces does not print a message to screen 0.7/0.8, but does on 0.9 (and current github).Run outside of a
test_that
block, the message is displayed on all versions (0.7-current).The message printing messes up the output when running a big block of tests that produce a lot of messages as messages are interspersed through all the progress dots.
I believe this was incorporated in 2a60cc9, because prior to that, because this block suppresses messages while this block does not. I can't see where in the nested
tryCatch
/withCallingHandlers
that asuppressMessages
would go now (or the magic incantation to getinvokeRestart("muffleMessage")
to work).Output of
sessionInfo
:The text was updated successfully, but these errors were encountered: