Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is_testing

Determine testing status


Description

  • is_testing() determine if code is being run as part of a test

  • is_parallel() if the test is being run in parallel.

  • testing_package() gives name of the package being tested.

These are thin wrappers that retrieve the values of environment variables. To avoid creating a run-time dependency on testthat, you can inline the source of these functions directly into your package.

Usage

is_testing()

is_parallel()

testing_package()

testthat

Unit Testing for R

v3.0.2
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre], RStudio [cph, fnd], R Core team [ctb] (Implementation of utils::recover())
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.