testmeEnvInit: Initialize testing environment

View source: R/RtestingHelpers.R

testmeEnvInitR Documentation

Initialize testing environment

Description

Create package internal environment to hold global state. Calling this function is not required under normal operation. This function is called internally, when whole files or directories are tested. It needs to be called when single testing functions are to be evaluated in an ad-hoc fashion (see vignette).

Usage

testmeEnvInit(
  expectationsFolder = Sprintf("%{d}s/RtestsExpectations", d = tempdir()),
  logger = LogAt1
)

Arguments

expectationsFolder

Path to folder to store test expectations in. Defaults to the RtestsExpectations sub-folder of argument d.

logger

Function used to print messages. Defaults to LogAt1 which prints to stderr and includes the date

d

Base folder holding tests. Defauts to tempdir()

Value

Returns the internal environment used by testme


sboehringer/testme documentation built on Jan. 17, 2024, 4:58 p.m.