-
Notifications
You must be signed in to change notification settings - Fork 316
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
Silently ignoring syntax error in test file? #1360
Comments
It is a bug in parallel testthat. ❯ Sys.setenv(TESTTHAT_PARALLEL = "FALSE")
❯ testthat::test_local(filter = "numbers")
✔ | OK F W S | Context
⠏ | 0 | numbers
Error in parse(con, n = -1, srcfile = srcfile, encoding = "UTF-8") :
test-numbers.R:17:19: unexpected '::'
16: # FIXME: Use fixed digits
17: tibble::tibble:: |
I have a bug where a syntax error in a file causes testthat parallel to hang forever. The issue was a missing parenthesis, and there was no notification in the main process. Is that the same as this? |
@billdenney Possibly. |
@gaborcsardi , I just tried to make a reprex, and I got this behavior. So, I think that either my issue was the same or it's fixed. |
I have just been bitten by this. It seems that usethis::create_package(".")
usethis::use_testthat(parallel = TRUE)
usethis::use_test("syntax")
# Whatever to create a syntax error
write("@", "tests/testthat/test-syntax.R", append = TRUE)
# Suceeds
testthat::test_local() Tested with |
To replicate, run the "numbers" tests in r-lib/pillar@3611c62 via
testthat::test_local(filter = "numbers")
. Can't (easily) create a reprex here.The syntax error is
tibble::tibble::tibble
, which is rejected by the parser in a clean session.The text was updated successfully, but these errors were encountered: