-
Notifications
You must be signed in to change notification settings - Fork 64
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
Address check()
vs test()
failure modes
#501
Conversation
…iate, and renaming some files to either have all underscores or all hyphens.
skip_if_not(check_tf_version))
where appropr…check()
vs test()
failure modes
These changes are a bit tricky to test, since they aren't replicated on GH actions, but instead locally. One clue I have so far is tests failing due to other settings being turned on. What I mean is there are tests in test_inference and friends: https://github.com/greta-dev/greta/blob/master/tests/testthat/test_inference.R#L505-L541 Where some part of the However, these errors are then appearing in places they shouldn't, and when running
Which is super weird since those should only happen when the It's possible that some of these tests aren't cleaning up after themselves properly, and we should be using https://www.tidyverse.org/blog/2020/04/self-cleaning-test-fixtures/ |
…w future plan and environment variables are set and cleaned up upon exit
OK so locally, doing:
However, doing This makes me wonder if there is something happening with each |
sometimes putting it back when it appears to break everything. Ugh.
…hat it apparently needs special help to find?
…n't solve the mockery problem
This pull request was largely resolved by the fact that the tests that mock python installation, e.g., test_that("check_tf_version errors when have_python, _tf, or _tfp is FALSE", {
mockery::stub(check_tf_version, 'have_python', FALSE)
mockery::stub(check_tf_version, 'have_tf', FALSE)
mockery::stub(check_tf_version, 'have_tfp', FALSE)
expect_snapshot_error(
check_tf_version("error")
)
expect_snapshot_warning(
check_tf_version("warn")
)
expect_snapshot(
check_tf_version("message")
)
}) These tests from Along the journey for this, I ended up doing the following things:
(commits above were extracted using the below code, then tidied up) library(tidyverse)
library(gert)
# not sure how to get the number of commits in a message
my_git_commit_logs <- git_log(max = 26)
my_git_commit_logs %>%
arrange(time) %>%
pull(message) %>%
paste0("* ", .) %>%
clipr::write_clip() |
Should resolve #500