PeteHaitch / cometh

An R package with tools for analysing, managing and visualising co-methylation data. Loosely speaking, co-methylation is the correlation structure of DNA methylation.
0 stars 1 forks source link

Generating test data #16

Closed PeteHaitch closed 10 years ago

PeteHaitch commented 10 years ago

Some of the testthat files, e.g. test-CoMeth_class.R and test-MTuples_class.R, define a function make_test_data. This function would be better off in a helper script that is sourced when required.

I need to figure out the proper way to source a helper script/function using the testthat framework.

PeteHaitch commented 10 years ago

testthat::source_dir looks like it might be useful or is it only for sourcing tests?

PeteHaitch commented 10 years ago

The way to do this in testthat is apparently with helper scripts. See tests/testthat/helper_make_test_data.R.