Skip to content

Commit 696938e

Browse files
OldLipeM3nin0
andcommitted
tests: Fix conflict
Co-authored-by: Felipe Carlos <efelipecarlos@gmail.com>
2 parents 93c6ab1 + f8f6ca1 commit 696938e

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

R/api_file_info.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,12 @@ NULL
333333
start_date[[1L]], end_date[[1L]]
334334
)
335335
}
336-
fi[dates_in_fi, ]
336+
# get the timeline
337+
timeline <- .fi_timeline(fi)
338+
# filter timeline by existing dates
339+
timeline <- timeline[dates_in_fi]
340+
# filter tiles by dates
341+
dplyr::filter(fi, .data[["date"]] %in% timeline)
337342
}
338343
#' @title Filter file_info for a set of dates
339344
#' @noRd
@@ -347,7 +352,7 @@ NULL
347352
miss_dates <- paste0("'", dates[!dates_in_fi], "'", collapse = ",")
348353
stop("date(s) ", miss_dates, " not found")
349354
}
350-
fi[.fi_timeline(fi) %in% dates, ]
355+
dplyr::filter(fi, .data[["date"]] %in% dates)
351356
}
352357
#' @title Read a block based in a file info
353358
#' @noRd

tests/testthat/test-cube-mpc.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ test_that("Creating Sentinel-1 RTC cubes from MPC", {
150150
rast_sar <- p[[1]]$shp
151151
expect_equal(.raster_nlayers(rast_sar), 1)
152152

153-
output_dir <- paste0(tempdir(), "/s1rtc_reg")
153+
output_dir <- paste0(tempdir(), "/s1rtc_reg_sar")
154154
if (!dir.exists(output_dir)) {
155155
dir.create(output_dir)
156156
}

tests/testthat/test-cube-terrascope.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ test_that("Creating WORLD-CEREAL-2021 cubes from TERRASCOPE",{
5050
},
5151
.default = NULL
5252
)
53-
5453
testthat::skip_if(purrr::is_null(world_cereal_2021),
5554
message = "TERRASCOPE is not accessible")
5655

0 commit comments

Comments
 (0)