tests/testthat/test-environment-provenance.R

test_that("environment capture is self-comparable", {
  x <- capture_gazepoint_environment(packages="gp3ml")
  y <- compare_gazepoint_environments(x, x)
  expect_s3_class(y, "gp3ml_environment_comparison")
  expect_identical(y$status, "pass")
})
test_that("environment self-comparison is fully classified and plot-safe", {

  x <- capture_gazepoint_environment(
    packages = "gp3ml"
  )

  y <- compare_gazepoint_environments(
    x,
    x
  )

  expect_identical(
    y$status,
    "pass"
  )

  expect_false(
    anyNA(
      c(
        y$packages$status,
        y$core$status
      )
    )
  )

  expect_true(
    all(
      y$core$status == "pass"
    )
  )

  expect_silent(
    plot(y)
  )
})

Try the gp3ml package in your browser

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

gp3ml documentation built on Aug. 23, 2026, 5:11 p.m.