Running ‘testthat.R’ [10m/16m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(abn)
  abn version 3.0.3 (2023-11-03) is loaded.
  To cite the package 'abn' in publications call: citation('abn').
  
  Attaching package: 'abn'
  
  The following object is masked from 'package:base':
  
      factorial
  
  > 
  > require(RhpcBLASctl)
  Loading required package: RhpcBLASctl
  > omp_set_num_threads(2)
  > 
  > test_check("abn")
  dev.new(): using pdf(file="Rplots1.pdf")
  
  Iteration 1 - deviance = 801.89 - criterion = 2.014199
  Iteration 2 - deviance = 800.5341 - criterion = 0.04426251
  Iteration 3 - deviance = 800.5339 - criterion = 5.210016e-06
  Iteration 4 - deviance = 800.5339 - criterion = 5.363507e-13
  converged
  
  Iteration 1 - deviance = 798.6166 - criterion = 1.874215
  Iteration 2 - deviance = 797.3505 - criterion = 0.03945357
  Iteration 3 - deviance = 797.3503 - criterion = 8.411144e-06
  Iteration 4 - deviance = 797.3503 - criterion = 6.416675e-13
  converged
  
  Iteration 1 - deviance = 800.841 - criterion = 1.953695
  Iteration 2 - deviance = 799.4241 - criterion = 0.04384531
  Iteration 3 - deviance = 799.424 - criterion = 5.262527e-06
  Iteration 4 - deviance = 799.424 - criterion = 7.763524e-13
  converged
  
  Iteration 1 - deviance = 733.9755 - criterion = 1.056032
  Iteration 2 - deviance = 730.6673 - criterion = 0.04998392
  Iteration 3 - deviance = 730.577 - criterion = 0.002808114
  Iteration 4 - deviance = 730.5768 - criterion = 7.365004e-06
  Iteration 5 - deviance = 730.5768 - criterion = 3.999521e-11
  converged
  [ FAIL 23 | WARN 0 | SKIP 15 | PASS 557 ]
  
  ══ Skipped tests (15) ══════════════════════════════════════════════════════════
  • BuildScoreCache(method=mle) crashes with Poisson nodes (1):
    'test-fitabn_mle.R:132:3'
  • Numerical results are not tested for method='bayes' (2):
    'test-build_score_cache_bayes.R:51:3', 'test-build_score_cache_bayes.R:104:3'
  • On CRAN (4): 'test-build_score_cache.R:380:3', 'test-fitabn.R:111:3',
    'test-plot-abn.R:34:3', 'test-tographviz.R:27:3'
  • Plot classic view is deprecated. (1): 'test-plot-abn.R:117:3'
  • calc.node.inla.glm() test not yet implemented. (1):
    'test-calc_node_inla_glm.R:2:3'
  • calc.node.inla.glmm() test not yet implemented. (1):
    'test-calc_node_inla_glmm.R:2:3'
  • empty test (2): 'test-mostprobable.R:163:1', 'test-search_hillclimber.R:48:1'
  • getmarginals() tests not yet implemented. (1): 'test-getmarginals.R:2:3'
  • plotting for abnHillClimber is not up to date with searchHillClimber()'s
    output. (1): 'test-abn-methods.R:117:3'
  • simulateAbn() with method 'bayes' is not tested with 'group.var'. (1):
    'test-simulateabn.R:778:5'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-build_score_cache.R:94:7'): buildScoreCache() checks work fine ──
  Expected `buildScoreCache(...)` to run without any errors.
  i Actually got a <simpleError> with text:
    task 1 failed - "object 'fit' not found"
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-build_score_cache.R:33:3
   2. │ └─base::withCallingHandlers(...)
   3. ├─base::suppressMessages(...) at test-build_score_cache.R:34:5
   4. │ └─base::withCallingHandlers(...)
   5. └─testthat::expect_no_error(...) at test-build_score_cache.R:94:7
  ── Failure ('test-build_score_cache.R:115:7'): buildScoreCache() checks work fine ──
  Expected `buildScoreCache(...)` to run without any errors.
  i Actually got a <simpleError> with text:
    task 1 failed - "object 'fit' not found"
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-build_score_cache.R:33:3
   2. │ └─base::withCallingHandlers(...)
   3. ├─base::suppressMessages(...) at test-build_score_cache.R:34:5
   4. │ └─base::withCallingHandlers(...)
   5. └─testthat::expect_no_error(...) at test-build_score_cache.R:115:7
  ── Failure ('test-build_score_cache.R:303:7'): buildScoreCache() is backward compatible ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    task 1 failed - "object 'fit' not found"
  Backtrace:
      ▆
   1. ├─base::suppressMessages(...) at test-build_score_cache.R:179:3
   2. │ └─base::withCallingHandlers(...)
   3. └─testthat::expect_no_error(...) at test-build_score_cache.R:262:5
  ── Failure ('test-build_score_cache.R:366:13'): buildScoreCache() works with all distributions ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    task 1 failed - "object 'fit' not found"
  Backtrace:
      ▆
   1. ├─base::suppressMessages(...) at test-build_score_cache.R:335:3
   2. │ └─base::withCallingHandlers(...)
   3. ├─utils::capture.output(...) at test-build_score_cache.R:337:7
   4. │ └─base::withVisible(...elt(i))
   5. └─testthat::expect_no_error(...) at test-build_score_cache.R:364:9
  ── Failure ('test-build_score_cache_mle.R:261:11'): forLoopContent() works as expected. ──
  Expected `forLoopContent(...)` to run without any errors.
  i Actually got a <simpleError> with text:
    object 'fit' not found
  Backtrace:
      ▆
   1. ├─base::suppressMessages(...) at test-build_score_cache_mle.R:257:3
   2. │ └─base::withCallingHandlers(...)
   3. ├─base::suppressWarnings(...) at test-build_score_cache_mle.R:258:5
   4. │ └─base::withCallingHandlers(...)
   5. ├─utils::capture.output(...) at test-build_score_cache_mle.R:260:9
   6. │ └─base::withVisible(...elt(i))
   7. └─testthat::expect_no_error(...) at test-build_score_cache_mle.R:261:11
  ── Error ('test-build_score_cache_mle.R:275:11'): forLoopContent() works as expected. ──
  Error in `forLoopContent(row.num = 1, mycache = mycache, data.dists = data.dists, 
      data.df.multi = data.df.multi, adj.vars = adj.vars, data.df = data.df, 
      data.df.lvl = data.df.lvl, group.var = group.var, group.ids = group.ids, 
      control = control, n = nvars, verbose = verbose)`: object 'fit' not found
  Backtrace:
       ▆
    1. ├─base::suppressMessages(...) at test-build_score_cache_mle.R:257:3
    2. │ └─base::withCallingHandlers(...)
    3. ├─base::suppressWarnings(...) at test-build_score_cache_mle.R:258:5
    4. │ └─base::withCallingHandlers(...)
    5. ├─utils::capture.output(...) at test-build_score_cache_mle.R:260:9
    6. │ └─base::withVisible(...elt(i))
    7. ├─testthat::expect_equal(...) at test-build_score_cache_mle.R:275:11
    8. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    9. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   10. └─abn::forLoopContent(...)
  ── Error ('test-fitabn.R:67:3'): fitAbn() works with DAG as formula statement ──
  Error in `{
      regressionLoop(i = i, dag = dag, data.df = data.df, data.df.multi = data.df.multi, 
          data.dists = data.dists, group.var = group.var, grouped.vars = grouped.vars, 
          group.ids = group.ids, control = control, nvars = nvars, 
          nobs = nobs, dag.multi = dag.multi, verbose = verbose)
  }`: task 1 failed - "object 'fit' not found"
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test-fitabn.R:67:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─abn::fitAbn(...)
   10.   └─abn::fitAbn.mle(...)
   11.     └─... %do% ...
   12.       └─e$fun(obj, substitute(ex), parent.frame(), e$data)
  ── Failure ('test-fitabn.R:376:7'): fitabn() works with all distributions, grouping and class abnCache ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    task 1 failed - "object 'fit' not found"
  ── Failure ('test-fitabn.R:384:5'): fitabn() works with all distributions, grouping and class abnCache ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    object 'mycache.mle' not found
  ── Error ('test-fitabn.R:387:5'): fitabn() works with all distributions, grouping and class abnCache ──
  Error in `eval(code, test_env)`: object 'mp.dag.mle' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-fitabn.R:386:3
   2. │ └─testthat:::expect_condition_matching(...)
   3. │   └─testthat:::quasi_capture(...)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─base::withCallingHandlers(...)
   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   7. └─abn::fitAbn(object = mp.dag.mle, data.df = df, data.dists = mydists) at test-fitabn.R:387:5
  ── Failure ('test-fitabn_mle.R:486:13'): fitAbn's regressionLoop() works w/o group.var. ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    object 'fit' not found
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-fitabn_mle.R:481:3
   2. │ └─base::withCallingHandlers(...)
   3. ├─base::suppressMessages(...) at test-fitabn_mle.R:482:5
   4. │ └─base::withCallingHandlers(...)
   5. ├─utils::capture.output(...) at test-fitabn_mle.R:484:9
   6. │ └─base::withVisible(...elt(i))
   7. └─testthat::expect_no_error(...) at test-fitabn_mle.R:485:11
  ── Error ('test-fitabn_mle.R:502:11'): fitAbn's regressionLoop() works w/o group.var. ──
  Error in `eval(code, test_env)`: object 'res' not found
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-fitabn_mle.R:481:3
   2. │ └─base::withCallingHandlers(...)
   3. ├─base::suppressMessages(...) at test-fitabn_mle.R:482:5
   4. │ └─base::withCallingHandlers(...)
   5. ├─utils::capture.output(...) at test-fitabn_mle.R:484:9
   6. │ └─base::withVisible(...elt(i))
   7. └─testthat::expect_equal(...) at test-fitabn_mle.R:502:11
   8.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   9.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure ('test-fitabn_mle.R:596:13'): fitAbn's regressionLoop() works w/ group.var. ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    object 'fit' not found
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-fitabn_mle.R:591:3
   2. │ └─base::withCallingHandlers(...)
   3. ├─base::suppressMessages(...) at test-fitabn_mle.R:592:5
   4. │ └─base::withCallingHandlers(...)
   5. ├─utils::capture.output(...) at test-fitabn_mle.R:594:9
   6. │ └─base::withVisible(...elt(i))
   7. └─testthat::expect_no_error(...) at test-fitabn_mle.R:595:11
  ── Error ('test-fitabn_mle.R:612:11'): fitAbn's regressionLoop() works w/ group.var. ──
  Error in `eval(code, test_env)`: object 'res' not found
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-fitabn_mle.R:591:3
   2. │ └─base::withCallingHandlers(...)
   3. ├─base::suppressMessages(...) at test-fitabn_mle.R:592:5
   4. │ └─base::withCallingHandlers(...)
   5. ├─utils::capture.output(...) at test-fitabn_mle.R:594:9
   6. │ └─base::withVisible(...elt(i))
   7. └─testthat::expect_equal(...) at test-fitabn_mle.R:612:11
   8.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   9.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Error ('test-simulateabn.R:692:11'): simulateAbn() simulation works with method 'mle' ──
  Error in `{
      forLoopContent(row.num = row.num, mycache = mycache, data.dists = data.dists, 
          data.df.multi = data.df.multi, adj.vars = adj.vars, data.df = data.df, 
          data.df.lvl = data.df.lvl, group.var = group.var, group.ids = group.ids, 
          control = control, n = nvars, verbose = verbose)
  }`: task 1 failed - "object 'fit' not found"
  Backtrace:
       ▆
    1. ├─base::suppressWarnings(...) at test-simulateabn.R:680:5
    2. │ └─base::withCallingHandlers(...)
    3. ├─base::suppressMessages(...) at test-simulateabn.R:681:7
    4. │ └─base::withCallingHandlers(...)
    5. ├─utils::capture.output(...) at test-simulateabn.R:682:9
    6. │ └─base::withVisible(...elt(i))
    7. └─abn::buildScoreCache(...) at test-simulateabn.R:692:11
    8.   └─abn::buildScoreCache.mle(...)
    9.     └─... %do% ...
   10.       └─e$fun(obj, substitute(ex), parent.frame(), e$data)
  ── Error ('test-simulateabn.R:858:13'): simulateAbn() works with grouping in real data. ──
  Error in `{
      forLoopContent(row.num = row.num, mycache = mycache, data.dists = data.dists, 
          data.df.multi = data.df.multi, adj.vars = adj.vars, data.df = data.df, 
          data.df.lvl = data.df.lvl, group.var = group.var, group.ids = group.ids, 
          control = control, n = nvars, verbose = verbose)
  }`: task 1 failed - "object 'fit' not found"
  Backtrace:
       ▆
    1. ├─base::suppressMessages(...) at test-simulateabn.R:827:3
    2. │ └─base::withCallingHandlers(...)
    3. ├─base::suppressWarnings(...) at test-simulateabn.R:828:5
    4. │ └─base::withCallingHandlers(...)
    5. ├─utils::capture.output(...) at test-simulateabn.R:830:9
    6. │ └─base::withVisible(...elt(i))
    7. └─abn::buildScoreCache(...) at test-simulateabn.R:858:13
    8.   └─abn::buildScoreCache.mle(...)
    9.     └─... %do% ...
   10.       └─e$fun(obj, substitute(ex), parent.frame(), e$data)
  ── Failure ('test-tographviz.R:67:11'): toGraphviz() works with all distributions. ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    task 1 failed - "object 'fit' not found"
  Backtrace:
      ▆
   1. ├─utils::capture.output(...) at test-tographviz.R:53:3
   2. │ └─base::withVisible(...elt(i))
   3. ├─base::suppressMessages(...) at test-tographviz.R:54:5
   4. │ └─base::withCallingHandlers(...)
   5. └─testthat::expect_no_error(...) at test-tographviz.R:65:7
  ── Failure ('test-tographviz.R:76:9'): toGraphviz() works with all distributions. ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    object 'mycache.mle' not found
  Backtrace:
      ▆
   1. ├─utils::capture.output(...) at test-tographviz.R:53:3
   2. │ └─base::withVisible(...elt(i))
   3. ├─base::suppressMessages(...) at test-tographviz.R:54:5
   4. │ └─base::withCallingHandlers(...)
   5. └─testthat::expect_no_error(...) at test-tographviz.R:75:7
  ── Failure ('test-tographviz.R:80:11'): toGraphviz() works with all distributions. ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    object 'mp.dag.mle' not found
  Backtrace:
      ▆
   1. ├─utils::capture.output(...) at test-tographviz.R:53:3
   2. │ └─base::withVisible(...elt(i))
   3. ├─base::suppressMessages(...) at test-tographviz.R:54:5
   4. │ └─base::withCallingHandlers(...)
   5. └─testthat::expect_no_error(...) at test-tographviz.R:78:7
  ── Failure ('test-tographviz.R:89:5'): toGraphviz() works with all distributions. ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    object 'myres.mle' not found
  ── Failure ('test-tographviz.R:97:5'): toGraphviz() works with all distributions. ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    object 'myres.mle' not found
  ── Failure ('test-tographviz.R:105:5'): toGraphviz() works with all distributions. ──
  Expected `{ ... }` to run without any errors.
  i Actually got a <simpleError> with text:
    object 'mp.dag.mle' not found
  ── Error ('test-tographviz.R:134:5'): toGraphviz() works with all distributions. ──
  Error in `eval(code, test_env)`: object 'myres.mle' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test-tographviz.R:133:3
   2. │ └─testthat:::expect_condition_matching(...)
   3. │   └─testthat:::quasi_capture(...)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─base::withCallingHandlers(...)
   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   7. └─abn::toGraphviz(...) at test-tographviz.R:134:5
  
  [ FAIL 23 | WARN 0 | SKIP 15 | PASS 557 ]
  Deleting unused snapshots:
  • tographviz/graph.dot
  • tographviz/graph1.dot
  • tographviz/graph_group.dot
  Error: Test failures
  Execution halted