-
Notifications
You must be signed in to change notification settings - Fork 195
coverage tests for zzz.R #629
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
Conversation
|
@jimhester do you remember a purpose for |
|
You can delete it. |
R/utils.R
Outdated
| } | ||
|
|
||
| # from ?chartr | ||
| # nocov start used in .onLoad which is nocov |
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.
rot() could still be tested, no?
expect_identical(
rot(c(letters, LETTERS, " ", "'")),
c(letters[14L:26L], LETTERS, " ", "'", letters[1L:13L])
)
AshesITR
left a 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.
Please add a test for rot() instead of # nocov
|
I don't see a way to test https://stackoverflow.com/questions/105007/should-i-test-private-methods-or-only-public-ones so I've become more hesitant about testing things that we can't get to directly... if the intention is to get to 100% on covr then that's also fine. any thoughts? |
|
I'm thinking a test wouldn't hurt as the public interface using the code is # nocov'd ( No strong opinon on this instance though. Do as you see fit, the rest of the diff looks good to me - approving. |
|
but rot is not exported right?
I was recently pointed to this when trying to test private functions:
https://softwareengineering.stackexchange.com/questions/100959/how-do-you-unit-test-private-methods
I'm happy to do so if our goal is 100% coverage, or if you can think of a
way to test it obliquely
…On Mon, Nov 30, 2020, 12:04 PM AshesITR ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Please add a test for rot() instead of # nocov
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#629 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2BA5KD7PJAWODVGGR6HODSSPGC5ANCNFSM4UG24WVA>
.
|
named_listis unused in R/, so deletedstr.lintr_functionwon't be called unless we@exportit to get it registered as S3. Of course, given that it hasn't been used till now, the other option is to just delete this function; LMK.