Skip to content

Commit

Permalink
fix: faulty tests due to data.table update
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDenz1 committed Sep 3, 2024
1 parent 2822344 commit 635a4c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test_sim_discrete_time.r
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,10 @@ test_that("helpful error message formula error", {
node("A", type="rbernoulli") +
node_td("B", type="gaussian", formula= ~ -1 + A*2 + C*3)

skip_on_cran()
expect_error(sim_discrete_time(dag, n_sim=100, max_t=3),
paste0("An error occured when interpreting the formula of ",
"node 'B'. The message was:\nError: Error: column(s) not ",
"node 'B'. The message was:\nError: Error in `[.data.table`",
"(mod_mat, , args$parents, with = FALSE): column(s) not ",
"found: [A, C]\nThis error may occur when one of the terms ",
"in a supplied ", "formula does not match any variables ",
"in the generated data.\n Please check whether all terms ",
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test_sim_from_dag.r
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ test_that("helpful error message formula error", {
node("A", type="rbernoulli") +
node("B", type="gaussian", formula= ~ -1 + A*2 + C*3)

skip_on_cran()
expect_error(sim_from_dag(dag, n_sim=100),
paste0("An error occured when interpreting the formula of ",
"node 'B'. The message was:\nError: Error: column(s) not ",
"node 'B'. The message was:\nError: Error in `[.data.table`",
"(mod_mat, , args$parents, with = FALSE): column(s) not ",
"found: [A, C]\nThis error may occur when one of the terms ",
"in a supplied formula does not match any variables in ",
"the generated data.\n Please check whether all terms in ",
Expand Down

0 comments on commit 635a4c1

Please sign in to comment.