tests/testthat/test-python-info.R

test_that("python_info() accepts system python", {

  if (file.exists("/usr/bin/python")) {

    info <- python_info("/usr/bin/python")

    expected <- list(
      python = "/usr/bin/python",
      type = "system",
      root = "/usr/bin"
    )

    expect_equal(info, expected)

  }
})

Try the reticulate package in your browser

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

reticulate documentation built on Oct. 13, 2023, 1:08 a.m.