-
Notifications
You must be signed in to change notification settings - Fork 10
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
stop_mocking() should untrace all functions (closes #66, #78) #79
Conversation
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.
Thanks for doing this! A few suggestions.
tests/testthat/test-mock-api.R
Outdated
for (verb in c("GET", "PUT", "POST", "PATCH", "DELETE", "VERB", "RETRY")) { | ||
fun <- getFromNamespace(verb, 'httr') |
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.
So that we don't have to use :::
to get them:
for (verb in c("GET", "PUT", "POST", "PATCH", "DELETE", "VERB", "RETRY")) { | |
fun <- getFromNamespace(verb, 'httr') | |
for (fun_name in c("GET", "PUT", "POST", "PATCH", "DELETE", "VERB", "RETRY", "body_config", "request_perform")) { | |
fun <- getFromNamespace(fun_name, "httr") |
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.
One minor suggestion but otherwise LGTM, thank you!
fixed stop_mocking() that did not untrace all functionstly called safe_untrace. Added corresponding tests. Should fix issue #78 and #66.