Skip to content

Commit e0ee749

Browse files
Optionally skip tests requiring 'mapproj' (#5200)
1 parent 523b923 commit e0ee749

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/testthat/test-coord-map.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
test_that("USA state map drawn", {
2+
skip_if_not_installed("mapproj") # required for coord_map()
23
skip_if_not_installed("maps") # required for map_data()
34
skip_if(packageVersion("base") < "3.5.0")
45
us_map <- map_data("usa")
@@ -12,6 +13,7 @@ test_that("USA state map drawn", {
1213
})
1314

1415
test_that("coord_map scale position can be switched", {
16+
skip_if_not_installed("mapproj") # required for coord_map()
1517
skip_if_not_installed("maps") # required for map_data()
1618
skip_if(packageVersion("base") < "3.5.0")
1719
us_map <- map_data("usa")
@@ -27,6 +29,7 @@ test_that("coord_map scale position can be switched", {
2729
})
2830

2931
test_that("Inf is squished to range", {
32+
skip_if_not_installed("mapproj") # required for coord_map()
3033
skip_if_not_installed("maps") # required for mproject()
3134
skip_if(packageVersion("base") < "3.5.0")
3235
d <- cdata(

tests/testthat/test-geom-hline-vline-abline.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ test_that("check h/v/abline transformed on basic projections", {
2727
})
2828

2929
test_that("curved lines in map projections", {
30+
skip_if_not_installed("mapproj") # required for coord_map()
3031
skip_if_not_installed("maps") # required for map_data()
3132
skip_if(packageVersion("base") < "3.5.0")
3233
nz <- subset(map_data("nz"), region == "North.Island ")

0 commit comments

Comments
 (0)