Learn R Programming

covr (version 4.0.0)

in_covr: Determine if code is being run in covr

Description

covr functions set the environment variable R_COVR to "true" while they are running. in_covr() returns TRUE if the environment variable is exactly "true" and FALSE otherwise, e.g. to skip tests that don't work while measuring coverage.

Usage

in_covr()

Arguments

Value

A single TRUE or FALSE.

Examples

Run this code
testthat::skip_if(in_covr())

Run the code above in your browser using DataLab