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

Implement skip_on_covr() #895

Merged
merged 3 commits into from Jul 19, 2019
Merged

Implement skip_on_covr() #895

merged 3 commits into from Jul 19, 2019

Conversation

ianmcook
Copy link
Contributor

@ianmcook ianmcook commented Jul 9, 2019

This implements skip_on_covr() which skips tests when covr is running by inspecting the R_COVR environment variable. Thanks!

@jimhester
Copy link
Member

Thanks, I think the code looks good! I am just curious as to the use cases when you need to skip tests when running with covr? Is it because the tests fail with covr and not without or is it some other reason?

@ianmcook
Copy link
Contributor Author

Thanks Jim! Yes, I ran into a case where tests failed with covr immediately after succeeding with testthat. I was using a live Impala instance to run the test so I don’t have a self-contained reprex handy but I’ll see if I can create one, and I’ll create a covr issue with the details if I can.

@gaborcsardi
Copy link
Member

@jimhester FWIW I am skipping these in covr, but it is not a typical use case:
https://github.com/r-lib/callr/blob/b2d8a58a6409af3c6c3bfb91eb021c2048c6b3f8/tests/testthat/test-clean-subprocess.R

@ianmcook
Copy link
Contributor Author

@jimhester here's the underlying covr issue that caused me to need to skip some tests: r-lib/covr#379

@hadley hadley merged commit c048ac1 into r-lib:master Jul 19, 2019
@hadley
Copy link
Member

hadley commented Jul 19, 2019

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

4 participants