testthat_transcribe_file

0th

Percentile

Transcribes a testtaht File Into unitizer Format

Internal use only, required so we can ensure the parse succeeded because of possible parse-deparse issues independent of running unitize, since unitize cannot be run inside a tryCatch block.

Keywords
internal
Usage
testthat_transcribe_file(file.name, target.dir = file.path(dirname(file.name),
  "..", "unitizer"), keep.testthat.call = TRUE, prompt = "always",
  interactive.mode, ...)
Arguments
file.name

a path to the testthat test file to convert

target.dir

the directory to create the unitizer test file and test store in; for testthat_translate_file only: if NULL will return as a character vector what the contents of the translated file would have been instead of writing the file

keep.testthat.call

whether to preserve the testthat call that was converted, as a comment

prompt

character(1L):

  • "always" to always prompt before writing new files

  • "overwrite" only prompt if existing file is about to be overwritten

  • "never" never prompt

interactive.mode

logical(1L) primarily for testing purposes, allows us to force prompting in non-interactive mode; note that unitize and unitize_dir are always called in non-interactive mode by these functions, this parameter only controls prompts generated directly by these functions.

...

params to pass on to testthat_translate_name

Aliases
  • testthat_transcribe_file
Documentation reproduced from package unitizer, version 1.4.8, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.