Skip to content

Commit

Permalink
test-qgis-plugins.R: stop testing number of enabled plugins *
Browse files Browse the repository at this point in the history
Under some (yet unkown) conditions the 'processing' plugin can
appear as disabled; yet its algorithms remain available to qgis_process (see Details
section of qgis_enable_plugins() docs).

This has been noted in macOS, Windows, and Ubuntu, but not in each GHA workflow
setup.

The fact that this comes up after the implementation of skipping loaded plugins
may mean that --skip-loading-plugins interferes with the 'processing'
plugin being enabled or not. As long this poses no critical problem in R, no
further investigation is needed here.

In a few GHA jobs this pops up as if no processing providers are enabled, which
fails a few expectations. Hence dropping these (actually unneeded) expectations
(about counting number of enabled plugins) so that the 'processing' plugin artifact
is no party-stopper.
  • Loading branch information
florisvdh committed May 12, 2024
1 parent 9acb05d commit 40eb8eb
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions tests/testthat/test-qgis-plugins.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@ test_that("qgis_plugins(which = \"all\", query = FALSE) returns sensible things"
skip_if_not(has_qgis())
plugins <- qgis_plugins(which = "all", query = FALSE)
expect_correct_plugins_format(plugins)
expect_gte(sum(plugins$enabled), 1)
})

test_that("qgis_plugins(which = \"enabled\", query = FALSE) returns sensible things", {
skip_if_not(has_qgis())
plugins <- qgis_plugins(which = "enabled", query = FALSE)
expect_correct_plugins_format(plugins)
expect_gte(sum(plugins$enabled), 1)
})

test_that("qgis_plugins(which = \"disabled\", query = FALSE) returns sensible things", {
skip_if_not(has_qgis())
plugins <- qgis_plugins(which = "disabled", query = FALSE)
expect_correct_plugins_format(plugins)
expect_gte(sum(!plugins$enabled), 0)
})

test_that("qgis_plugins(query = FALSE, quiet = FALSE) messages are OK", {
Expand All @@ -41,7 +38,6 @@ test_that(glue("qgis_plugins(query = TRUE) works when using JSON output"), {

plugins <- qgis_plugins(query = TRUE)
expect_correct_plugins_format(plugins)
expect_gte(sum(plugins$enabled), 1)
})

test_that(glue("qgis_plugins(query = TRUE) works when NOT using JSON output"), {
Expand All @@ -53,7 +49,6 @@ test_that(glue("qgis_plugins(query = TRUE) works when NOT using JSON output"), {

plugins <- qgis_plugins(query = TRUE)
expect_correct_plugins_format(plugins)
expect_gte(sum(plugins$enabled), 1)
})


Expand Down

0 comments on commit 40eb8eb

Please sign in to comment.