Skip to content
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

covr fails to track coverage of some R6 methods #601

Closed
hadley opened this issue Feb 13, 2025 · 1 comment
Closed

covr fails to track coverage of some R6 methods #601

hadley opened this issue Feb 13, 2025 · 1 comment

Comments

@hadley
Copy link
Member

hadley commented Feb 13, 2025

I've seen this problem before, but I've finally decided to sit down and get to the bottom of it — I have an R6 class where some methods are correctly annotated as being covered, and some that are incorrectly annotated as not being covered.

What I've tried so far:

  • 100% confirming that my tests do run the expected code.
  • Carefully looking at the uncovered tests/methods to see if they're different to the covered tests/methods — nothing that I can see. Both tests and methods are straightforward.
  • Removing all tests except for one that doesn't trigger coverage — no difference, suggesting that it's not something going wrong part way through.
  • Print debugging covr to confirm that my method is getting annotated — it sure is.

What else could I try @jimhester ?

@hadley
Copy link
Member Author

hadley commented Feb 13, 2025

Oh I'm an idiot 😭 I had a skip_on_covr() that was firing when I didn't expect it.

@hadley hadley closed this as completed Feb 13, 2025
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

1 participant