testmeFileSingle: Run all tests defined in an R-script

View source: R/RtestingHelpers.R

testmeFileSingleR Documentation

Run all tests defined in an R-script

Description

Identify tests in an R file and run the tests

Usage

testmeFileSingle(file, expectationsFolder, useGit, print = F, logger = LogAt1)

Arguments

file

Path to R-script

expectationsFolder

Folder into which test results are either vivified (see testMe()) or from which expectations are read for comparison after vivification.

useGit

logical to inidicate whether vivifications are to be commited by a call to 'git'

print

logicial to indicate whether a report is to be printed

logger

function that is used to print results, can be used to redirect output

Details

This function takes the path to a single R-file. Function names ending in '_test' are considered to contain test definitions. These functions are called and test results are returned.

Value

returns a list for each test executed that contains testing status and number of subtests run


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