expect_snapshot_r_process | R Documentation |
This function is very similar to testthat::expect_snapshot_output()
,
but it runs the code in an asciciast subprocess, using record_output()
.
expect_snapshot_r_process(
...,
interactive = TRUE,
echo = TRUE,
startup = NULL,
transform = NULL,
variant = NULL
)
... |
Code to run (unnamed arguments) and arguments to pass to
|
interactive |
Whether to use an interactive R process to evaluate the code. |
echo |
Whether to echo the code in the subprocess before running it. |
startup |
Expression to evaluate in the subprocess before recording the snapshot. By default it loads and attaches the calling package, including its internal functions. |
transform |
Passed to |
variant |
Passed to |
THe Code
part of the snapshot is always the same, but the
Output
part shows the code, assuming echo = TRUE
(the default).
Sys.getpid()
testthat::local_edition(3)
expect_snapshot_r_process(Sys.getpid())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.