Skip to content

Commit

Permalink
tests: use expect_match
Browse files Browse the repository at this point in the history
  • Loading branch information
m-muecke committed Jun 7, 2024
1 parent 4b4ff75 commit 7ec4ddb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test_encapsulate.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ test_that("timeout", {
res = encapsulate("evaluate", .f = f, .args = list(x = 1), .timeout = 1)
expect_null(res$result)
expect_true("error" %in% res$log$class)
expect_true(any(grepl("time limit", res$log$msg, fixed = TRUE)))
expect_match(res$log$msg, "time limit", fixed = TRUE)

res = encapsulate("callr", .f = f, .args = list(x = 1), .timeout = 1)
expect_null(res$result)
expect_true("error" %in% res$log$class)
expect_true(any(grepl("time limit", res$log$msg, fixed = TRUE)))
expect_match(res$log$msg, "time limit", fixed = TRUE)
})


Expand Down

0 comments on commit 7ec4ddb

Please sign in to comment.