tests/testthat/test_load_model.R

context("Loading the model")
library(MOFA2)

test_that("a pre-trained model can be loaded from disk", {
  filepath <- system.file("extdata", "model.hdf5", package = "MOFA2")
  expect_is(load_model(filepath), "MOFA")
})

Try the MOFA2 package in your browser

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

MOFA2 documentation built on Nov. 8, 2020, 7:28 p.m.