tests/testthat/test-qgis-has.R

test_that("qgis_has_algorithm() works", {
  skip_if_not(has_qgis())
  expect_true(qgis_has_algorithm("native:filedownloader"))
  expect_false(qgis_has_algorithm("notanalgorithm"))
})

test_that("qgis_has_provider() works", {
  skip_if_not(has_qgis())
  expect_true(qgis_has_provider("native"))
  expect_false(qgis_has_provider("notaprovider"))
})

test_that("qgis_has_plugin() works", {
  skip_if_not(has_qgis())
  expect_true(qgis_has_plugin("processing"))
  expect_false(qgis_has_plugin("notaplugin"))
})

Try the qgisprocess package in your browser

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

qgisprocess documentation built on Sept. 11, 2024, 6:43 p.m.