tests/testthat/test_methods-lgpfit.R

library(lgpr)
source("helpers/SW.R")

# -------------------------------------------------------------------------
SW({
  fit <- example_fit(refresh = 0, quiet = TRUE)
})

context("Methods for lgpfit objects")

test_that("postprocessing information can be removed and computed again", {
  expect_error(postproc(fit), "already contains postprocessing information")
  fit <- clear_postproc(fit)
  expect_true(!contains_postproc(fit))
  fit <- postproc(fit, verbose = FALSE)
  expect_true(contains_postproc(fit))
})

Try the lgpr package in your browser

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

lgpr documentation built on Sept. 24, 2023, 9:06 a.m.