Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check snapshotting reporter when expectations run outside of tests #1161

Closed
hadley opened this issue Aug 29, 2020 · 1 comment
Closed

Check snapshotting reporter when expectations run outside of tests #1161

hadley opened this issue Aug 29, 2020 · 1 comment

Comments

@hadley
Copy link
Member

hadley commented Aug 29, 2020

eg,

Loading required package: DiceKriging
-- ERROR (test-km.R:43:1): (code run outside of `test_that()`) -----------------
Error: no such index at level 1

Backtrace:1. └─DiceKriging:::test_that.km(...) test-km.R:43:0
 2.   └─testthat::test_that(...) test-km.R:17:4
 3.     └─testthat:::test_code(desc, code, env = parent.frame(), reporter = reporter)
 4.       └─reporter$start_test(context = reporter$.context, test = test)
 5.         └─testthat:::o_apply(self$reporters, "start_test", context, test)
 6.           └─base::lapply(objects, f)
 7.             └─testthat:::FUN(X[[i]], ...)
 8.               └─x$start_test(...)
@hadley
Copy link
Member Author

hadley commented Sep 1, 2020

Root cause was constructed test call like test_that(c("a", "b"), ...)

@hadley hadley closed this as completed in 9fd835a Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant