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))
})
jtimonen/lgpr documentation built on Oct. 12, 2023, 11:13 p.m.