tests/testthat/test-bootstrap-metadata.R

test_that("package metadata identifies the first formal release", {
  if (requireNamespace("gp3ml", quietly = TRUE)) {
    metadata <- utils::packageDescription("gp3ml")
    package_name <- metadata$Package
    package_version <- metadata$Version
  } else {
    description_path <- testthat::test_path(
      "..",
      "..",
      "DESCRIPTION"
    )

    expect_true(file.exists(description_path))

    metadata <- read.dcf(description_path)
    package_name <- unname(metadata[1, "Package"])
    package_version <- unname(metadata[1, "Version"])
  }

  expect_identical(package_name, "gp3ml")
  expect_identical(package_version, as.character(utils::packageVersion("gp3ml")))
})

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.