tests/testthat/test-get_cultivars_param.R

stics_version <- get_stics_versions_compat()$latest_version

xml_plant <- file.path(
  get_examples_path("xml", stics_version = stics_version),
  "file_plt.xml"
)

cv_param_df <- get_cultivars_param(file = xml_plant)

context("Getting returned type")
test_that("type, data.frame", {
  expect_is(cv_param_df, "data.frame")
})

context("Checking presence of row names")
test_that("rownames", {
  expect_identical(! is.null(rownames(cv_param_df)), TRUE)
})

Try the SticsRFiles package in your browser

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

SticsRFiles documentation built on Sept. 12, 2024, 7:41 a.m.