Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP 211 adjust tests after introduction of [.qenv in teal.code #1396

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions tests/testthat/test-module_teal.R
Original file line number Diff line number Diff line change
Expand Up @@ -1332,10 +1332,10 @@ testthat::describe("srv_teal filters", {
c(
"iris <- iris",
"mtcars <- mtcars",
sprintf('stopifnot(rlang::hash(iris) == "%s")', rlang::hash(iris)),
sprintf('stopifnot(rlang::hash(mtcars) == "%s")', rlang::hash(mtcars)),
sprintf('stopifnot(rlang::hash(iris) == "%s") # @linksto iris', rlang::hash(iris)),
sprintf('stopifnot(rlang::hash(mtcars) == "%s") # @linksto mtcars', rlang::hash(mtcars)),
".raw_data <- list2env(list(iris = iris, mtcars = mtcars))",
"lockEnvironment(.raw_data)",
"lockEnvironment(.raw_data) #@linksto .raw_data",
m7pr marked this conversation as resolved.
Show resolved Hide resolved
"mtcars <- dplyr::filter(mtcars, cyl == 4)"
),
collapse = "\n"
Expand Down Expand Up @@ -1510,10 +1510,10 @@ testthat::describe("srv_teal teal_module(s) transformer", {
expected_code <- paste(collapse = "\n", c(
"iris <- iris",
"mtcars <- mtcars",
sprintf('stopifnot(rlang::hash(iris) == "%s")', rlang::hash(iris)),
sprintf('stopifnot(rlang::hash(mtcars) == "%s")', rlang::hash(mtcars)),
sprintf('stopifnot(rlang::hash(iris) == "%s") # @linksto iris', rlang::hash(iris)),
sprintf('stopifnot(rlang::hash(mtcars) == "%s") # @linksto mtcars', rlang::hash(mtcars)),
".raw_data <- list2env(list(iris = iris, mtcars = mtcars))",
"lockEnvironment(.raw_data)",
"lockEnvironment(.raw_data) #@linksto .raw_data",
m7pr marked this conversation as resolved.
Show resolved Hide resolved
'iris <- dplyr::filter(iris, Species == "versicolor")',
"mtcars <- dplyr::filter(mtcars, cyl == 6)",
"iris <- head(iris, n = 6)",
Expand Down Expand Up @@ -1556,10 +1556,10 @@ testthat::describe("srv_teal teal_module(s) transformer", {
expected_code <- paste(collapse = "\n", c(
"iris <- iris",
"mtcars <- mtcars",
sprintf('stopifnot(rlang::hash(iris) == "%s")', rlang::hash(iris)),
sprintf('stopifnot(rlang::hash(mtcars) == "%s")', rlang::hash(mtcars)),
sprintf('stopifnot(rlang::hash(iris) == "%s") # @linksto iris', rlang::hash(iris)),
sprintf('stopifnot(rlang::hash(mtcars) == "%s") # @linksto mtcars', rlang::hash(mtcars)),
".raw_data <- list2env(list(iris = iris, mtcars = mtcars))",
"lockEnvironment(.raw_data)",
"lockEnvironment(.raw_data) #@linksto .raw_data",
m7pr marked this conversation as resolved.
Show resolved Hide resolved
"mtcars <- dplyr::filter(mtcars, cyl == 4)",
"iris <- head(iris, n = 6)",
"mtcars <- head(mtcars, n = 6)"
Expand Down
Loading