Learn R Programming

testthat (version 2.3.0)

context: Describe the context of a set of tests.

Description

Use of context() is no longer recommend. Instead omit it, and messages will use the name of the file instead. This ensures that the context and test file name are always in sync.

Usage

context(desc)

Arguments

desc

description of context. Should start with a capital letter.

Details

A context defines a set of tests that test related functionality. Usually you will have one context per file, but you may have multiple contexts in a single file if you so choose.

Examples

Run this code
# NOT RUN {
context("String processing")
context("Remote procedure calls")
# }

Run the code above in your browser using DataLab