tests/testthat/test-python-scope.R

test_that("r helper accesses 'active' environment for tests", {
  rA <- 100
  pA <- py_eval("r.rA", convert = TRUE)
  expect_equal(rA, pA)
})
rstudio/reticulate documentation built on May 25, 2024, 4:14 p.m.