Skip to content

Commit

Permalink
clean up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Feb 5, 2022
1 parent e2079d2 commit d1d64fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 6 additions & 4 deletions R/shared-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -638,10 +638,12 @@ CountryDataClass <- R6::R6Class("CountryDataClass",
}

if (!is.null(self$target_regions)) {
self$target_regions <- countryname(
self$target_regions,
destination = "country.name.en",
warn = FALSE
self$target_regions <- suppressWarnings(
countryname(
self$target_regions,
destination = "country.name.en",
warn = FALSE
)
)
if (all(is.na(self$target_regions))) {
stop("No countries found with target names")
Expand Down
4 changes: 0 additions & 4 deletions tests/testthat/test-get_national_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ test_get_national_data <- function(source) {
countries = "rwfwf", source = source,
verbose = FALSE
))
expect_warning(get_national_data(
countries = "Zimbabwe", source = source,
verbose = FALSE
))
expect_equal(
true_steps,
get_national_data(source = source, steps = TRUE, verbose = FALSE)
Expand Down

0 comments on commit d1d64fb

Please sign in to comment.