Skip to content

Uncovered line with a specific test #603

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

Closed
billdenney opened this issue Feb 25, 2025 · 2 comments
Closed

Uncovered line with a specific test #603

billdenney opened this issue Feb 25, 2025 · 2 comments

Comments

@billdenney
Copy link

I'm trying to achieve 100% coverage for a small, new package. For the trivial vec_ptype_abbr method, I made a specific test for it, but the test is not showing coverage on the line. The uncovered line of code and the test are here

https://github.com/humanpred/tabtibble/blob/8f650bfb3d6f0b41cd353e5ced4602fb067eeb24/R/objects.R#L31

and here:

https://github.com/humanpred/tabtibble/blob/8f650bfb3d6f0b41cd353e5ced4602fb067eeb24/tests/testthat/test-objects.R#L38

Am I doing something incorrect or is there an issue with covr?

@jimhester
Copy link
Member

You need to export the S3 method in order for it to be registered, the method you linked to isn't currently being called.

@billdenney
Copy link
Author

Thanks, that was it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants