Closed dmenne closed 3 years ago
It looks like https://github.com/nealrichardson/httptest/blob/master/R/trace.R#L23 (as well as L28 below it) is missing the quietly()
wrapper to suppress messages that all the other trace()
calls in the file have. And you're probably right, we didn't notice this before because testthat
was suppressing the messages anyway.
Would you be interested in submitting a PR to add quietly()
to those two lines?
https://github.com/dmenne/httptest
Strange, still printing
Loading odkapi
Testing odkapi
v | OK F W S | Context
/ | 0 | AccountsAndUsersApi_Apiary Tracing body_config(body, match.arg(encode)) on exit
| | 3 | AccountsAndUsersApi_Apiary Tracing body_config(body, match.arg(encode)) on exit
\ | 10 | AccountsAndUsersApi_Apiary Tracing body_config(body, match.arg(encode)) on exit
Ah, that one is also missing print=getOption("httptest.debug", FALSE)
Thanks.
Sorry to reopen this: I had not tested carefully enough. It still prints on exit. Any ideas?
Loading odkapi
== Testing test-ProjectManagementApi_Apiary.R ==============================
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 32 ] Done!
Untracing function "form_file" in package "curl"
Test complete
Sounds like we need a CI job running the 3rd edition and checking for unsuppressed tracing messages. I won't get to this today but hopefully soon. @jonkeane any suggestions?
Yeah, lemme work on a branch to add 3rd/2nd edition testing. I started down the road to getting it working but ran into some issues with testing public()
with the dev version of testthat (IIRC the tests with either edition were no longer working appropriately) which might no longer be a problem.
I downloaded the latest master (SHA1 88dc7b5c), and it still shows the Untracing message in mock mode (not in capture)
I saw the mentioning of the newline in change log. Note in the printout below that it is similar to the first version I reported above (Untracing without newline before), while the second time reported there was a newline.
v | OK F W S | Context
v | 30 | AccountsAndUsersApi_Apiary [1.0 s]
/ | 0 | AppUsers_Apiary Untracing function "form_file" in package "curl"
| | 3 | AppUsers_Apiary Unt
The most recent change I tagged you on is still on a branch
Works fine with the new version. Thanks.
Great package - I had some fears that I would be fiddling a day to get the configuration right, things just worked out of the box!
A minor issue: My test output is a bit polluted by this output
tracing function "form_file" in package "curl"
which I do not understand where it comes from. How do I suppress it?
Note: I am using the "third edition": https://testthat.r-lib.org/articles/third-edition.html
so I cannot rule out that this is the result of the new "messages are not suppressed" feature.