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)
})

Try the reticulate package in your browser

Any scripts or data that you put into this service are public.

reticulate documentation built on June 22, 2024, 9:36 a.m.