Running ‘testthat.R’ [13s/22s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(envnames)
  > 
  > test_check("envnames")
  
  Environments involved:
  Current environment: <environment: R_GlobalEnv>
  Parent environment of env1: <environment: R_GlobalEnv>
  Parent environment of env2: <environment: R_GlobalEnv>
  Parent environment of env11: <environment: 0x560a4b9389e8>
  R_GlobalEnv env_of_envs       envir 
       "env2"      "env2"      "env2" 
  correct memory address: <0x560a518a2598> 
  observed result: TRUE 
  ── 1. Error: T0) the calling function at level 0 returns the current function we
  replacement has 1 row, data has 0
  1: with(globalenv(), env1$f(0)) at testthat/test-get_fun_calling.r:59
  2: with.default(globalenv(), env1$f(0))
  3: eval(substitute(expr), data, enclos = parent.frame())
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: env1$f(0)
  6: env2$g(level, showParameters = showParameters) at testthat/test-get_fun_calling.r:46
  7: h(level = level, showParameters = showParameters) at testthat/test-get_fun_calling.r:36
  8: get_fun_calling(level, showParameters) at testthat/test-get_fun_calling.r:25
  9: get_fun_calling_chain(n + 1, showParameters)
  10: `[<-`(`*tmp*`, l, , value = c("get_fun_calling(level, showParameters)", "envnames", 
     "envnames$get_fun_calling(level, showParameters)"))
  11: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling(level, showParameters)", 
     "envnames", "envnames$get_fun_calling(level, showParameters)"))
  12: xpdrows.data.frame(x, rows, new.rows)
  13: `[[<-`(`*tmp*`, i, value = NA_character_)
  14: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  15: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 2. Error: T1) the calling function at the first level is correctly computed (
  replacement has 1 row, data has 0
  1: with(globalenv(), env1$f(1)) at testthat/test-get_fun_calling.r:67
  2: with.default(globalenv(), env1$f(1))
  3: eval(substitute(expr), data, enclos = parent.frame())
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: env1$f(1)
  6: env2$g(level, showParameters = showParameters) at testthat/test-get_fun_calling.r:46
  7: get_fun_calling(level, showParameters = showParameters) at testthat/test-get_fun_calling.r:33
  8: get_fun_calling_chain(n + 1, showParameters)
  9: `[<-`(`*tmp*`, l, , value = c("get_fun_calling(level, showParameters = showParameters)", 
     "envnames", "envnames$get_fun_calling(level, showParameters = showParameters)"))
  10: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling(level, showParameters = showParameters)", 
     "envnames", "envnames$get_fun_calling(level, showParameters = showParameters)"))
  11: xpdrows.data.frame(x, rows, new.rows)
  12: `[[<-`(`*tmp*`, i, value = NA_character_)
  13: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  14: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 3. Error: T2) the calling function at level 2 returns the current function we
  replacement has 1 row, data has 0
  1: with(globalenv(), env1$f(2)) at testthat/test-get_fun_calling.r:75
  2: with.default(globalenv(), env1$f(2))
  3: eval(substitute(expr), data, enclos = parent.frame())
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: env1$f(2)
  6: env2$g(level, showParameters = showParameters) at testthat/test-get_fun_calling.r:46
  7: h(level = level, showParameters = showParameters) at testthat/test-get_fun_calling.r:36
  8: get_fun_calling(level, showParameters) at testthat/test-get_fun_calling.r:25
  9: get_fun_calling_chain(n + 1, showParameters)
  10: `[<-`(`*tmp*`, l, , value = c("get_fun_calling(level, showParameters)", "envnames", 
     "envnames$get_fun_calling(level, showParameters)"))
  11: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling(level, showParameters)", 
     "envnames", "envnames$get_fun_calling(level, showParameters)"))
  12: xpdrows.data.frame(x, rows, new.rows)
  13: `[[<-`(`*tmp*`, i, value = NA_character_)
  14: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  15: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 4. Error: T3) the calling function name is returned and no parameters are sho
  replacement has 1 row, data has 0
  1: with(globalenv(), env1$f(2, showParameters = FALSE)) at testthat/test-get_fun_calling.r:83
  2: with.default(globalenv(), env1$f(2, showParameters = FALSE))
  3: eval(substitute(expr), data, enclos = parent.frame())
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: env1$f(2, showParameters = FALSE)
  6: env2$g(level, showParameters = showParameters) at testthat/test-get_fun_calling.r:46
  7: h(level = level, showParameters = showParameters) at testthat/test-get_fun_calling.r:36
  8: get_fun_calling(level, showParameters) at testthat/test-get_fun_calling.r:25
  9: get_fun_calling_chain(n + 1, showParameters)
  10: `[<-`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  11: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  12: xpdrows.data.frame(x, rows, new.rows)
  13: `[[<-`(`*tmp*`, i, value = NA_character_)
  14: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  15: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 5. Error: T1) the function calling chain with several functions in the chain 
  replacement has 1 row, data has 0
  1: with(globalenv(), env1$f()) at testthat/test-get_fun_calling_chain.r:69
  2: with.default(globalenv(), env1$f())
  3: eval(substitute(expr), data, enclos = parent.frame())
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: env1$f()
  6: env2$g() at testthat/test-get_fun_calling_chain.r:50
  7: get_fun_calling_chain() at testthat/test-get_fun_calling_chain.r:29
  8: `[<-`(`*tmp*`, l, , value = c("g", "env2", "env2$g"))
  9: `[<-.data.frame`(`*tmp*`, l, , value = c("g", "env2", "env2$g"))
  10: xpdrows.data.frame(x, rows, new.rows)
  11: `[[<-`(`*tmp*`, i, value = NA_character_)
  12: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  13: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 6. Error: T1) an object in the global environment is found (@test-obj_find.r#
  replacement has 1 row, data has 0
  1: obj_find(y, envir = globalenv()) at testthat/test-obj_find.r:45
  2: get_fun_calling()
  3: get_fun_calling_chain(n + 1, showParameters)
  4: `[<-`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  5: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  6: xpdrows.data.frame(x, rows, new.rows)
  7: `[[<-`(`*tmp*`, i, value = NA_character_)
  8: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  9: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 7. Error: T2) an object in a package is found (@test-obj_find.r#55)  ────────
  replacement has 1 row, data has 0
  1: obj_find(mean, envir = baseenv()) at testthat/test-obj_find.r:55
  2: get_fun_calling()
  3: get_fun_calling_chain(n + 1, showParameters)
  4: `[<-`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  5: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  6: xpdrows.data.frame(x, rows, new.rows)
  7: `[[<-`(`*tmp*`, i, value = NA_character_)
  8: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  9: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 8. Error: T3a) an object inside a user-defined environment is found (@test-ob
  replacement has 1 row, data has 0
  1: obj_find(x, envir = env1) at testthat/test-obj_find.r:65
  2: get_fun_calling()
  3: get_fun_calling_chain(n + 1, showParameters)
  4: `[<-`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  5: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  6: xpdrows.data.frame(x, rows, new.rows)
  7: `[[<-`(`*tmp*`, i, value = NA_character_)
  8: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  9: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 9. Error: T3b) user-defined environments are found (@test-obj_find.r#81)  ───
  replacement has 1 row, data has 0
  1: obj_find("env2", envir = env_of_envs) at testthat/test-obj_find.r:81
  2: get_fun_calling()
  3: get_fun_calling_chain(n + 1, showParameters)
  4: `[<-`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  5: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  6: xpdrows.data.frame(x, rows, new.rows)
  7: `[[<-`(`*tmp*`, i, value = NA_character_)
  8: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  9: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 10. Error: T4) objects are found when given as text, including if object is g
  replacement has 1 row, data has 0
  1: obj_find("x", envir = env1) at testthat/test-obj_find.r:109
  2: get_fun_calling()
  3: get_fun_calling_chain(n + 1, showParameters)
  4: `[<-`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  5: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  6: xpdrows.data.frame(x, rows, new.rows)
  7: `[[<-`(`*tmp*`, i, value = NA_character_)
  8: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  9: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 11. Error: T6) an object referenced by an expression (e.g. alist$z where z = 
  replacement has 1 row, data has 0
  1: obj_find(alist$z, envir = env1) at testthat/test-obj_find.r:131
  2: obj_find(obj_eval, envir = envir_orig, globalsearch = globalsearch, n = n + 1, return_address = return_address, 
         include_functions = include_functions, silent = silent)
  3: get_fun_calling()
  4: get_fun_calling_chain(n + 1, showParameters)
  5: `[<-`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  6: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  7: xpdrows.data.frame(x, rows, new.rows)
  8: `[[<-`(`*tmp*`, i, value = NA_character_)
  9: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  10: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 12. Error: T8) looking for an object whose name is the name of another object
  replacement has 1 row, data has 0
  1: obj_find(y, envir = .GlobalEnv) at testthat/test-obj_find.r:191
  2: get_fun_calling()
  3: get_fun_calling_chain(n + 1, showParameters)
  4: `[<-`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  5: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  6: xpdrows.data.frame(x, rows, new.rows)
  7: `[[<-`(`*tmp*`, i, value = NA_character_)
  8: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  9: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 13. Error: T9) objects are found in all nested environments
            as well
  replacement has 1 row, data has 0
  1: obj_find("zz", envir = env_of_envs) at testthat/test-obj_find.r:204
  2: get_fun_calling()
  3: get_fun_calling_chain(n + 1, showParameters)
  4: `[<-`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  5: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  6: xpdrows.data.frame(x, rows, new.rows)
  7: `[[<-`(`*tmp*`, i, value = NA_character_)
  8: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  9: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 14. Error: T10a) when obj_find() is called from within an environment, object
  replacement has 1 row, data has 0
  1: with(env_of_envs, obj_find("zz", envir = env_of_envs)) at testthat/test-obj_find.r:226
  2: with.default(env_of_envs, obj_find("zz", envir = env_of_envs))
  3: eval(substitute(expr), data, enclos = parent.frame())
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: obj_find("zz", envir = env_of_envs)
  6: get_fun_calling()
  7: get_fun_calling_chain(n + 1, showParameters)
  8: `[<-`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  9: `[<-.data.frame`(`*tmp*`, l, , value = c("get_fun_calling", "envnames", "envnames$get_fun_calling"
     ))
  10: xpdrows.data.frame(x, rows, new.rows)
  11: `[[<-`(`*tmp*`, i, value = NA_character_)
  12: `[[<-.data.frame`(`*tmp*`, i, value = NA_character_)
  13: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 245 SKIPPED: 14 FAILED: 14
  1. Error: T0) the calling function at level 0 returns the current function we are in (@test-get_fun_calling.r#59) 
  2. Error: T1) the calling function at the first level is correctly computed (@test-get_fun_calling.r#67) 
  3. Error: T2) the calling function at level 2 returns the current function we are in (@test-get_fun_calling.r#75) 
  4. Error: T3) the calling function name is returned and no parameters are shown (@test-get_fun_calling.r#83) 
  5. Error: T1) the function calling chain with several functions in the chain is correctly created (@test-get_fun_calling_chain.r#69) 
  6. Error: T1) an object in the global environment is found (@test-obj_find.r#45) 
  7. Error: T2) an object in a package is found (@test-obj_find.r#55) 
  8. Error: T3a) an object inside a user-defined environment is found (@test-obj_find.r#65) 
  9. Error: T3b) user-defined environments are found (@test-obj_find.r#81) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted