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

use file_coverage for package with internal functions #600

Open
Naikless opened this issue Feb 5, 2025 · 0 comments
Open

use file_coverage for package with internal functions #600

Naikless opened this issue Feb 5, 2025 · 0 comments

Comments

@Naikless
Copy link

Naikless commented Feb 5, 2025

I am starting to introduce unittests to a package that didn't have them before, meaning that I have only implemented them for a few of the package scripts yet.

For this reason, I would like to test coverage only for specific files of the package. As far as I understand, this should be possible with

file_coverage( source_files = "source.R",  test_files = "test-source.R")

However, I run into the problem that calls to package functions inside these tests produce could not find function errors.
Is this to be expected?

package_coverage works but takes a lot longer. Is there any other way this could be achieved?

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