Skip to content

Commit

Permalink
style: restyle guided by lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Mar 15, 2024
1 parent 14b504f commit 41b6d1a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library(testthat)
library(EMODnetWFS)
library(testthat) # nolint: undesirable_function_linter
library(EMODnetWFS) # nolint: undesirable_function_linter

test_check("EMODnetWFS")
4 changes: 2 additions & 2 deletions tests/testthat/helper.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library(httptest)
library(httptest) # nolint: undesirable_function_linter

forget_all <- function() {
memoise::forget(emodnet_wfs)
Expand All @@ -7,7 +7,7 @@ forget_all <- function() {
}

with_mock_dir <- function(name, ...) {
httptest::with_mock_dir(file.path("../fixtures", name), ...)
httptest::with_mock_dir(file.path("../fixtures", name), ...) # nolint: nonportable_path_linter
}

create_biology_wfs <- function() {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/setup.R
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pre_test_options <- options(EMODnetWFS.quiet = TRUE)
pre_test_options <- options(EMODnetWFS.quiet = TRUE)# nolint: undesirable_function_linter
2 changes: 1 addition & 1 deletion tests/testthat/teardown.R
Original file line number Diff line number Diff line change
@@ -1 +1 @@
options(pre_test_options)
options(pre_test_options)# nolint: undesirable_function_linter
2 changes: 1 addition & 1 deletion tests/testthat/test-layers.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test_that("reduce layers on single layer returns sf", {
})

test_that("emodnet_get_layers errors well when no service nor wfs", {
expect_snapshot_error(emodnet_get_layers(layers = c("randomlayer")))
expect_snapshot_error(emodnet_get_layers(layers = "randomlayer"))
})

test_that("emodnet_get_layers errors well when bad wfs", {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/testdata/test-data-prep.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ attr_desc <- layer_attribute_descriptions(wfs, layer = "maritimebnds")
testthis::use_testdata(attr_desc, overwrite = TRUE)


maritime_crs <- EMODnetWFS:::get_layer_default_crs(
maritime_crs <- get_layer_default_crs(
layer = "maritimebnds",
wfs,
output = "crs"
Expand Down

0 comments on commit 41b6d1a

Please sign in to comment.