Running 'testthat.R' [16s/18s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(satellite)
  Loading required package: raster
  Loading required package: sp
  > 
  > 
  > ### functions to create test data sets -----
  > 
  > ### Utility functions to quickly create test data sets for various sensors
  > ### Florian Detsch, last modified on 2017-07-24
  > 
  > tst_obj <- function(type = c("LC08", "LC8", "LE07", "LE7", "LT05")) {
  +   if (type[1] == "LC08")
  +     tst_obj_lc08()
  +   else if (type[1] == "LC8")
  +     tst_obj_lc8()
  +   else if (type[1] == "LE07")
  +     tst_obj_le07()
  +   else if (type[1] == "LE7")
  +     tst_obj_le7()
  +   else if (type[1] == "LT05")
  +     tst_obj_lt05()
  +   else 
  +     stop("Sensor test data not available, yet.\n")
  + }
  > 
  > 
  > ### collection 1 level-1 -----
  > 
  > ## landsat 8
  > tst_obj_lc08 <- function() {
  +   path <- system.file("extdata", package = "satellite")
  +   files <- list.files(path, pattern = glob2rx("LC08*.TIF"), full.names = TRUE)
  +   satellite(files)
  + }
  > 
  > ## landsat 7
  > tst_obj_le07 <- function() {
  +   path <- system.file("extdata", package = "satellite")
  +   files <- list.files(path, pattern = glob2rx("LE07*.TIF"), full.names = TRUE)
  +   satellite(files)
  + }
  > 
  > ## landsat 5
  > tst_obj_lt05 <- function() {
  +   path <- system.file("testdata/LT05", package = "satellite")
  +   files <- list.files(path, pattern = glob2rx("LT05*.TIF"), full.names = TRUE)
  +   satellite(files)
  + }
  > 
  > 
  > ### precollection level-1 -----
  > 
  > ## landsat 8
  > tst_obj_lc8 <- function() {
  +   path <- system.file("testdata/LC8", package = "satellite")
  +   files <- list.files(path, pattern = glob2rx("LC8*.TIF"), full.names = TRUE)
  +   satellite(files)
  + }
  > 
  > ## landsat 7
  > tst_obj_le7 <- function() {
  +   path <- system.file("testdata/LE7", package = "satellite")
  +   files <- list.files(path, pattern = glob2rx("LE7*.TIF"), full.names = TRUE)
  +   satellite(files)
  + }
  > 
  > 
  > ### perform tests -----
  > 
  > test_check("satellite")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcAtmosCorr.R#8: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-calcAtmosCorr.R#5: test_that("calcAtmosCorr for RasterLayers works as expected", 
      {
          path <- system.file("testdata/LC8", package = "satellite")
          files <- list.files(path, pattern = glob2rx("LC8*.TIF"), 
              full.names = TRUE)
          sat <- satellite(files)
          sat <- calcTOAIrradRadRef(sat)
          bcde <- "B002n"
          path_rad <- calcPathRadDOS(x = min(getValues(getSatDataLayer(sat, 
              bcde))), bnbr = getSatLNBR(sat, bcde), band_wls = data.frame(LMIN = getSatLMIN(sat, 
              getSatBCDESolar(sat)), LMAX = getSatLMAX(sat, getSatBCDESolar(sat))), 
              radm = getSatRADM(sat, getSatBCDESolar(sat)), rada = getSatRADA(sat, 
                  getSatBCDESolar(sat)), szen = getSatSZEN(sat, 
                  getSatBCDESolar(sat)), esun = getSatESUN(sat, 
                  getSatBCDESolar(sat)), model = "DOS2")
          sensor_rad <- convSC2Rad(x = getSatDataLayer(sat, bcde), 
              mult = getSatRADM(sat, bcde), add = getSatRADA(sat, 
                  bcde))
          ref_atmos <- calcAtmosCorr(x = sensor_rad, path_rad = path_rad[names(path_rad) == 
              bcde], esun = getSatESUN(sat, bcde), szen = getSatSZEN(sat, 
              bcde), model = "DOS2")
          expect_equal(round(raster::getValues(ref_atmos)[50], 
              4), round(0.0455, 4))
      })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 1. Error: calcAtmosCorr for RasterLayers works as expected (@test-calcAtmosCo
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcAtmosCorr.R#46: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-calcAtmosCorr.R#41: test_that("calcAtmosCorr processes all solar bands", {
      path = system.file("extdata", package = "satellite")
      files = list.files(path, pattern = "^LC08.*.TIF$", full.names = TRUE)
      sat = satellite(files)
      sat = calcAtmosCorr(sat)
      bds = getSatBCDE(sat)
      bds = bds[grep("AtmosCorr", bds)]
      expect_equal(length(bds), sum(lut$L8_BANDS == "solar", na.rm = TRUE))
      path = system.file("extdata", package = "satellite")
      files = list.files(path, pattern = "^LE07.*.TIF$", full.names = TRUE)
      sat = satellite(files)
      sat = calcAtmosCorr(sat)
      bds = getSatBCDE(sat)
      bds = bds[grep("AtmosCorr", bds)]
      expect_equal(length(bds), sum(lut$L7_BANDS == "solar", na.rm = TRUE))
  })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 2. Error: calcAtmosCorr processes all solar bands (@test-calcAtmosCorr.R#46) 
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcAtmosCorr.R#71: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-calcAtmosCorr.R#68: test_that("calcAtmosCorr for Satellite works as expected", {
      path <- system.file("extdata", package = "satellite")
      files <- list.files(path, pattern = glob2rx("LC08*.TIF"), 
          full.names = TRUE)
      sat <- satellite(files)
      sat_atmos <- calcAtmosCorr(sat, model = "DOS2", esun_method = "RadRef")
      expect_equal(round(raster::getValues(getSatDataLayer(sat_atmos, 
          bcde = "B002n_REF_AtmosCorr"))[50], 4), round(0.0441, 
          4))
  })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 3. Error: calcAtmosCorr for Satellite works as expected (@test-calcAtmosCorr.
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcDODN.R#8: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-calcDODN.R#4: test_that("calcDODN works as expected", {
      path <- system.file("testdata/LC8", package = "satellite")
      files <- list.files(path, pattern = glob2rx("LC8*.TIF"), 
          full.names = TRUE)
      sat <- satellite(files)
      t1 <- calcDODN(getSatDataLayer(sat, bcde = "B002n"))
      t2 <- calcDODN(getSatDataLayer(sat, bcde = "B004n"))
      expect_equal(t1, 8763)
      expect_equal(t2, 6677)
      t1.1 <- calcDODN(sat, "B002n")
      expect_equal(t1, t1.1)
      t2.1 <- calcDODN(sat, "B004n")
      expect_equal(t2, t2.1)
      path <- system.file("extdata", package = "satellite")
      files <- list.files(path, pattern = glob2rx("LC08*.TIF"), 
          full.names = TRUE)
      sat <- satellite(files)
      t1.2 <- calcDODN(sat, bcde = "B002n")
      t2.2 <- calcDODN(sat, bcde = "B004n")
  })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 4. Error: calcDODN works as expected (@test-calcDODN.R#8)  ------------------
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcPathRadDOS.R#9: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-calcPathRadDOS.R#6: test_that("calcPathRadDOS for numeric works as expected", {
      path <- system.file("extdata", package = "satellite")
      files <- list.files(path, pattern = glob2rx("LC08*.TIF"), 
          full.names = TRUE)
      sat <- satellite(files)
      sat <- calcTOAIrradModel(sat)
      bcde <- "B002n"
      tx <- lapply(c(-4, -2, -1, -0.7, -0.5), function(i) {
          calcPathRadDOS(x = min(getValues(getSatDataLayer(sat, 
              bcde))), bnbr = getSatLNBR(sat, bcde), band_wls = data.frame(LMIN = getSatLMIN(sat, 
              getSatBCDESolar(sat)), LMAX = getSatLMAX(sat, getSatBCDESolar(sat))), 
              radm = getSatRADM(sat, getSatBCDESolar(sat)), rada = getSatRADA(sat, 
                  getSatBCDESolar(sat)), szen = getSatSZEN(sat, 
                  getSatBCDESolar(sat)), esun = getSatESUN(sat, 
                  getSatBCDESolar(sat)), model = "DOS2", scat_coef = i)
      })
  })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 5. Error: calcPathRadDOS for numeric works as expected (@test-calcPathRadDOS.
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcPathRadDOS.R#53: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-calcPathRadDOS.R#49: test_that("calcPathRadDOS for Satellite works as expected", {
      path <- system.file("extdata", package = "satellite")
      files <- list.files(path, pattern = glob2rx("LC08*.TIF"), 
          full.names = TRUE)
      sat <- satellite(files)
      sat_pathrad <- calcPathRadDOS(sat, model = "DOS2", esun_method = "RadRef")
  })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 6. Error: calcPathRadDOS for Satellite works as expected (@test-calcPathRadDO
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcTOAIrradModel.R#29: satellite(files)
  where 6: FUN(X[[i]], ...)
  where 7 at testthat/test-calcTOAIrradModel.R#26: lapply(1:length(path), function(i) {
      sid <- ifelse(i == 1, "LC08", "LC8")
      files <- list.files(path[i], pattern = glob2rx(paste0(sid, 
          "*.TIF")), full.names = TRUE)
      sat <- satellite(files)
      test <- calcTOAIrradModel(sat)
      expect_equal(as.character(getSatBID(test)[1]), "1")
      expect_equal(round(as.numeric(getSatESUN(test)[1]), 4), round(1888.4115033, 
          4))
      expect_equal(as.character(getSatBID(test)[2]), "2")
      expect_equal(round(as.numeric(getSatESUN(test)[2]), 4), round(1974.8429354, 
          4))
      expect_equal(as.character(getSatBID(test)[3]), "3")
      expect_equal(round(as.numeric(getSatESUN(test)[3]), 4), round(1851.7520559, 
          4))
      expect_equal(as.character(getSatBID(test)[11]), "11")
      expect_equal(round(as.numeric(getSatESUN(test)[11]), 4), 
          round(0.1068904, 4))
  })
  where 8: eval(code, test_env)
  where 9: eval(code, test_env)
  where 10: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 13: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 14: doTryCatch(return(expr), name, parentenv, handler)
  where 15: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 16: tryCatchList(expr, classes, parentenv, handlers)
  where 17: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 18: test_code(desc, code, env = parent.frame())
  where 19 at testthat/test-calcTOAIrradModel.R#20: test_that("calcTOAIrradModel for 'Satellite' objects works as expected", 
      {
          path <- c(system.file("extdata", package = "satellite"), 
              system.file("testdata/LC8", package = "satellite"))
          lapply(1:length(path), function(i) {
              sid <- ifelse(i == 1, "LC08", "LC8")
              files <- list.files(path[i], pattern = glob2rx(paste0(sid, 
                  "*.TIF")), full.names = TRUE)
              sat <- satellite(files)
              test <- calcTOAIrradModel(sat)
              expect_equal(as.character(getSatBID(test)[1]), "1")
              expect_equal(round(as.numeric(getSatESUN(test)[1]), 
                  4), round(1888.4115033, 4))
              expect_equal(as.character(getSatBID(test)[2]), "2")
              expect_equal(round(as.numeric(getSatESUN(test)[2]), 
                  4), round(1974.8429354, 4))
              expect_equal(as.character(getSatBID(test)[3]), "3")
              expect_equal(round(as.numeric(getSatESUN(test)[3]), 
                  4), round(1851.7520559, 4))
              expect_equal(as.character(getSatBID(test)[11]), "11")
              expect_equal(round(as.numeric(getSatESUN(test)[11]), 
                  4), round(0.1068904, 4))
          })
      })
  where 20: eval(code, test_env)
  where 21: eval(code, test_env)
  where 22: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 28: tryCatchList(expr, classes, parentenv, handlers)
  where 29: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 30: test_code(NULL, exprs, env)
  where 31: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 32: force(code)
  where 33: doWithOneRestart(return(expr), restart)
  where 34: withOneRestart(expr, restarts[[1L]])
  where 35: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 36: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 37: FUN(X[[i]], ...)
  where 38: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 39: force(code)
  where 40: doWithOneRestart(return(expr), restart)
  where 41: withOneRestart(expr, restarts[[1L]])
  where 42: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 43: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 44: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 46: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 47: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 7. Error: calcTOAIrradModel for 'Satellite' objects works as expected (@test-
  the condition has length > 1
  Backtrace:
   1. base::lapply(...)
   2. satellite:::FUN(X[[i]], ...)
   4. satellite::satellite(files)
   5. satellite:::.local(x, ...)
   6. satellite::lutInfoSGRPfromFilename(x)
   7. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcTOAIrradRadRef.R#8: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-calcTOAIrradRadRef.R#5: test_that("calcTOAIrradRadRef for 'numeric' input works as expected", 
      {
          path <- system.file("extdata", package = "satellite")
          files <- list.files(path, pattern = glob2rx("LC08*.TIF"), 
              full.names = TRUE)
          sat <- satellite(files)
          test <- calcTOAIrradRadRef(x = getSatRadMax(sat, getSatBCDESolar(sat)), 
              ref_max = getSatRefMax(sat, getSatBCDESolar(sat)), 
              normalize = FALSE, esd = calcEarthSunDist("2013-07-07"))
          expect_equal(round(as.numeric(test[1]), 3), round(1907.999, 
              3))
          expect_equal(round(as.numeric(test[3]), 3), round(1800.423, 
              3))
      })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 8. Error: calcTOAIrradRadRef for 'numeric' input works as expected (@test-cal
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcTOAIrradRadRef.R#22: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-calcTOAIrradRadRef.R#19: test_that("calcTOAIrradRadRef for 'numeric' input (P1L1) works as expected", 
      {
          path <- system.file("testdata/LC8", package = "satellite")
          files <- list.files(path, pattern = glob2rx("LC8*.TIF"), 
              full.names = TRUE)
          sat <- satellite(files)
          test <- calcTOAIrradRadRef(x = getSatRadMax(sat, getSatBCDESolar(sat)), 
              ref_max = getSatRefMax(sat, getSatBCDESolar(sat)), 
              normalize = FALSE, esd = calcEarthSunDist("2017-03-08"))
      })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 9. Error: calcTOAIrradRadRef for 'numeric' input (P1L1) works as expected (@t
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcTOAIrradRadRef.R#33: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-calcTOAIrradRadRef.R#30: test_that("calcTOAIrradRadRef for 'Satellite' input works as expected", 
      {
          path <- system.file("extdata", package = "satellite")
          files <- list.files(path, pattern = glob2rx("LC08*.TIF"), 
              full.names = TRUE)
          sat <- satellite(files)
          test <- calcTOAIrradRadRef(sat)
          expect_equal(as.character(getSatBID(test)[1]), "1")
          expect_equal(round(as.numeric(getSatESUN(test)[1]), 3), 
              round(1972.254, 3))
          expect_equal(as.character(getSatBID(test)[3]), "3")
          expect_equal(round(as.numeric(getSatESUN(test)[3]), 3), 
              round(1861.055, 3))
          sat <- satellite(files[c(1, 3, 4)])
          test <- calcTOAIrradRadRef(sat)
          expect_equal(as.character(getSatBID(test)[1]), "1")
          expect_equal(round(as.numeric(getSatESUN(test)[1]), 3), 
              round(1972.254, 3))
          expect_equal(as.character(getSatBID(test)[2]), "2")
          expect_equal(round(as.numeric(getSatESUN(test)[2]), 3), 
              round(2019.612, 3))
      })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 10. Error: calcTOAIrradRadRef for 'Satellite' input works as expected (@test-
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcTOAIrradRadRef.R#54: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-calcTOAIrradRadRef.R#51: test_that("calcTOAIrradRadRef for 'Satellite' input (P1L1) works as expected", 
      {
          path <- system.file("testdata/LC8", package = "satellite")
          files <- list.files(path, pattern = glob2rx("LC8*.TIF"), 
              full.names = TRUE)
          sat <- satellite(files)
          test <- calcTOAIrradRadRef(sat)
          expect_equal(as.character(getSatBID(test)[1]), "1")
          expect_equal(round(as.numeric(getSatESUN(test)[1]), 3), 
              round(1972.254, 3))
          expect_equal(as.character(getSatBID(test)[3]), "3")
          expect_equal(round(as.numeric(getSatESUN(test)[3]), 3), 
              round(1861.055, 3))
          sat <- satellite(files[c(1, 3, 4)])
          test <- calcTOAIrradRadRef(sat)
          expect_equal(as.character(getSatBID(test)[1]), "1")
          expect_equal(round(as.numeric(getSatESUN(test)[1]), 3), 
              round(1972.254, 3))
          expect_equal(as.character(getSatBID(test)[2]), "2")
          expect_equal(round(as.numeric(getSatESUN(test)[2]), 3), 
              round(2019.612, 3))
      })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 11. Error: calcTOAIrradRadRef for 'Satellite' input (P1L1) works as expected 
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-calcTOAIrradTable.R#26: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-calcTOAIrradTable.R#23: test_that("calcTOAIrradTable for 'Satellite' input works as expected", 
      {
          path <- system.file("testdata/LE7", package = "satellite")
          files <- list.files(path, pattern = glob2rx("LE7*.TIF"), 
              full.names = TRUE)
          sat <- satellite(files)
          test <- calcTOAIrradTable(sat)
          expect_equal(as.character(getSatBID(test)[2]), "2")
          expect_equal(as.numeric(getSatESUN(test)[2]), 1842)
          sat <- satellite(files[c(1, 3, 6)])
          test <- calcTOAIrradTable(sat)
          expect_equal(as.character(getSatBID(test)[2]), "3")
          expect_equal(as.numeric(getSatESUN(test)[2]), 1547)
          path <- system.file("testdata/LC8", package = "satellite")
          files <- list.files(path, pattern = glob2rx("LC8*.TIF"), 
              full.names = TRUE)
          sat <- satellite(files)
          expect_error(calcTOAIrradTable(sat))
      })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 12. Error: calcTOAIrradTable for 'Satellite' input works as expected (@test-c
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-extend.R#5: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(NULL, exprs, env)
  where 17: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 18: force(code)
  where 19: doWithOneRestart(return(expr), restart)
  where 20: withOneRestart(expr, restarts[[1L]])
  where 21: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 22: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 23: FUN(X[[i]], ...)
  where 24: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 25: force(code)
  where 26: doWithOneRestart(return(expr), restart)
  where 27: withOneRestart(expr, restarts[[1L]])
  where 28: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 29: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 30: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 31: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 32: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 33: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 13. Error: (unknown) (@test-extend.R#5)  ------------------------------------
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-maskInvarFeatures.R#9: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-maskInvarFeatures.R#3: test_that("maskInvarFeatures works as expected", {
      path <- system.file("testdata/LC8", package = "satellite")
      files <- list.files(path, pattern = glob2rx("LC8*.TIF"), 
          full.names = TRUE)
      sat <- satellite(files)
      t <- maskInvarFeatures(x = getSatDataLayer(sat, "B004n"), 
          nir = getSatDataLayer(sat, "B005n"), swir = getSatDataLayer(sat, 
              "B007n"))
  })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 14. Error: maskInvarFeatures works as expected (@test-maskInvarFeatures.R#9) 
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-satInfo.R#10: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-satInfo.R#4: test_that("satAddLog works as expected for Landsat 8", {
      path <- system.file("testdata/LC8", package = "satellite")
      files <- list.files(path, pattern = glob2rx("LC8*.TIF"), 
          full.names = TRUE)
      sat <- satellite(files)
      sat <- addSatLog(sat)
      sat <- addSatLog(sat)
      expect_equal(length(getSatLog(sat)), 3)
      expect_equal(names(getSatLog(sat)[3]), "ps0003")
  })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 15. Error: satAddLog works as expected for Landsat 8 (@test-satInfo.R#10)  --
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-satInvarFeatures.R#9: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-satInvarFeatures.R#3: test_that("maskInvarFeatures works as expected", {
      path <- system.file("testdata/LC8", package = "satellite")
      files <- list.files(path, pattern = glob2rx("LC8*.TIF"), 
          full.names = TRUE)
      sat <- satellite(files)
      t1 <- maskInvarFeatures(sat)
      expect_equal(raster::getValues(getSatDataLayer(t1, bcde = "M0000_InvarFeatures"))[77], 
          TRUE)
  })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 16. Error: maskInvarFeatures works as expected (@test-satInvarFeatures.R#9)  
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-satellite.R#12: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-satellite.R#8: test_that("satellite works as expected for Landsat 4 and 5 files (C1L1)", 
      {
          path <- system.file("testdata/LT05", package = "satellite")
          files <- list.files(path, pattern = "^LT05.*.TIF$", full.names = TRUE)
          sat <- satellite(files)
      })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 17. Error: satellite works as expected for Landsat 4 and 5 files (C1L1) (@tes
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-satellite.R#20: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-satellite.R#16: test_that("satellite works as expected for Landsat 7 files (C1L1)", 
      {
          path <- system.file("extdata", package = "satellite")
          files <- list.files(path, pattern = "^LE07.*.TIF$", full.names = TRUE)
          sat <- satellite(files)
      })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 18. Error: satellite works as expected for Landsat 7 files (C1L1) (@test-sate
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-satellite.R#28: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-satellite.R#24: test_that("satellite works as expected for Landsat 8 files (C1L1)", 
      {
          path <- system.file("extdata", package = "satellite")
          files <- list.files(path, pattern = "^LC08.*.TIF$", full.names = TRUE)
          sat <- satellite(files)
      })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 19. Error: satellite works as expected for Landsat 8 files (C1L1) (@test-sate
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-satellite.R#60: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-satellite.R#53: test_that("satellite works as expected for Landsat 7 files (P1L1)", 
      {
          path <- system.file("testdata/LE7", package = "satellite")
          files <- list.files(path, pattern = glob2rx("LE7*.TIF"), 
              full.names = TRUE)
          sat <- satellite(files)
          expect_equal(basename(attr(getSatDataLayers(sat)[[1]], 
              "file")@name), "LE71950252001211EDC00_B1.TIF")
          expect_equal(basename(attr(getSatDataLayers(sat)[[2]], 
              "file")@name), "LE71950252001211EDC00_B2.TIF")
          expect_equal(basename(attr(getSatDataLayers(sat)[[6]], 
              "file")@name), "LE71950252001211EDC00_B6_VCID_1.TIF")
          expect_equal(basename(attr(getSatDataLayers(sat)[[9]], 
              "file")@name), "LE71950252001211EDC00_B8.TIF")
          expect_equal(as.character(getSatMeta(sat)$BID[[1]]), 
              "1")
          expect_equal(as.character(getSatMeta(sat)$BID[[2]]), 
              "2")
          expect_equal(as.character(getSatMeta(sat)$BID[[6]]), 
              "6_VCID_1")
          expect_equal(as.character(getSatMeta(sat)$BID[[9]]), 
              "8")
          expect_equal(as.character(getSatMeta(sat)$BCDE[[1]]), 
              "B001n")
          expect_equal(as.character(getSatMeta(sat)$BCDE[[2]]), 
              "B002n")
          expect_equal(as.character(getSatMeta(sat)$BCDE[[6]]), 
              "B0061")
          expect_equal(as.character(getSatMeta(sat)$BCDE[[9]]), 
              "B008n")
      })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 20. Error: satellite works as expected for Landsat 7 files (P1L1) (@test-sate
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  satellite
   --- call from context --- 
  lutInfoSIDfromFilename(file)
   --- call from argument --- 
  if (class(test) == "matrix") {
      return(colnames(test)[test[1, ]])
  } else {
      return(names(test)[test])
  }
   --- R stacktrace ---
  where 1: lutInfoSIDfromFilename(file)
  where 2: lutInfoSGRPfromFilename(x)
  where 3: .local(x, ...)
  where 4: satellite(files)
  where 5 at testthat/test-satellite.R#86: satellite(files)
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test-satellite.R#80: test_that("satellite works as expected for Landsat 8 files (P1L1)", 
      {
          path <- system.file("testdata/LC8", package = "satellite")
          files <- list.files(path, pattern = glob2rx("LC8*.TIF"), 
              full.names = TRUE)
          sat <- satellite(files)
          expect_equal(names(getSatDataLayers(sat)[[1]]), "B001n")
          expect_equal(names(getSatDataLayers(sat)[[2]]), "B002n")
          expect_equal(names(getSatDataLayers(sat)[[8]]), "B008n")
          expect_equal(names(getSatDataLayers(sat)[[10]]), "B010n")
          expect_equal(names(getSatDataLayers(sat)[[12]]), "B0QAn")
          expect_equal(as.character(getSatMeta(sat)$BID[[1]]), 
              "1")
          expect_equal(as.character(getSatMeta(sat)$BID[[2]]), 
              "2")
          expect_equal(as.character(getSatMeta(sat)$BID[[6]]), 
              "6")
          expect_equal(as.character(getSatMeta(sat)$BID[[12]]), 
              "QA")
          expect_equal(as.character(getSatMeta(sat)$BCDE[[1]]), 
              "B001n")
          expect_equal(as.character(getSatMeta(sat)$BCDE[[2]]), 
              "B002n")
          expect_equal(as.character(getSatMeta(sat)$BCDE[[6]]), 
              "B006n")
          expect_equal(as.character(getSatMeta(sat)$BCDE[[12]]), 
              "B0QAn")
      })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 44: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_check("satellite")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (files) 
  {
      test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN, function(x) {
          grepl(x, basename(files))
      })
      if (!any(test)) {
          test <- sapply(lut$SENSOR_ID_PATTERN$PATTERN2, function(x) {
              grepl(x, basename(files))
          })
      }
      if (class(test) == "matrix") {
          return(colnames(test)[test[1, ]])
      }
      else {
          return(names(test)[test])
      }
  }
  <bytecode: 0xa31e758>
  <environment: namespace:satellite>
   --- function search by body ---
  Function lutInfoSIDfromFilename in namespace satellite has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 21. Error: satellite works as expected for Landsat 8 files (P1L1) (@test-sate
  the condition has length > 1
  Backtrace:
   1. satellite::satellite(files)
   2. satellite::satellite(files)
   3. satellite:::.local(x, ...)
   4. satellite::lutInfoSGRPfromFilename(x)
   5. satellite::lutInfoSIDfromFilename(file)
  
  == testthat results  ===========================================================
  [ OK: 64 | SKIPPED: 5 | WARNINGS: 0 | FAILED: 21 ]
  1. Error: calcAtmosCorr for RasterLayers works as expected (@test-calcAtmosCorr.R#8) 
  2. Error: calcAtmosCorr processes all solar bands (@test-calcAtmosCorr.R#46) 
  3. Error: calcAtmosCorr for Satellite works as expected (@test-calcAtmosCorr.R#71) 
  4. Error: calcDODN works as expected (@test-calcDODN.R#8) 
  5. Error: calcPathRadDOS for numeric works as expected (@test-calcPathRadDOS.R#9) 
  6. Error: calcPathRadDOS for Satellite works as expected (@test-calcPathRadDOS.R#53) 
  7. Error: calcTOAIrradModel for 'Satellite' objects works as expected (@test-calcTOAIrradModel.R#26) 
  8. Error: calcTOAIrradRadRef for 'numeric' input works as expected (@test-calcTOAIrradRadRef.R#8) 
  9. Error: calcTOAIrradRadRef for 'numeric' input (P1L1) works as expected (@test-calcTOAIrradRadRef.R#22) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted