inst/example/tests/testthat/test-basic.R

# This tests that we can install basilisk-dependent packages.
# library(testthat); source("test-basic.R")

test_that("internal test package installs correctly", {
    xpath <- basilisk.utils::getEnvironmentDir("son.of.basilisk")

    output <- son.of.basilisk::test()
    expect_true(file.exists(file.path(xpath, "env1")))
    expect_true(file.exists(file.path(xpath, "env2")))

    expect_type(output$pandas, "character")
    expect_true(length(output$pandas) > 0L)

    expect_type(output$sklearn, "character")
    expect_true(length(output$sklearn) > 0L)
})

Try the basilisk package in your browser

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

basilisk documentation built on Dec. 18, 2020, 2 a.m.