editCalls {unitizer} | R Documentation |
Edit Calls In Unitizer
Description
Used if you want to change language in test expression in a unitizer when
the actual results of running the expressions is unchanged. This is useful
if you decided to rename functions, etc., without having to re-run the entire
unitize
process since unitize
matches tests based on
expressions.
Usage
editCalls(x, lang.old, lang.new, ...)
## S4 method for signature 'unitizer,language,language'
editCalls(
x,
lang.old,
lang.new,
interactive.mode = interactive(),
interactive.only = TRUE,
...
)
Arguments
x |
a unitizer object |
lang.old |
the name of the function replace |
lang.new |
the new name of the function |
... |
unused |
interactive.mode |
logical(1L) whether to run in interactive mode ( request user input when needed) or not (error if user input is required, e.g. if all tests do not pass). |
interactive.only |
logical(1L) set to FALSE if you want to allow this to run in non-interactive mode, but warnings will be suppressed and will proceed without prompting, obviously... |
Value
a untizer object with function names modifies
Note
this is a somewhat experimental function, so make sure you backup any unitizers before you try to use it.
Examples
## Not run:
untz <- get_unitizer("tests/unitizer/mytests.unitizer")
untz.edited <- editCalls(untz, quote(myFun), quote(my_fun))
set_unitizer("tests/unitizer/mytests.unitizer", untz.edited)
## End(Not run)