-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
163 more tests for se filtered states #184
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about adding tests like this one?
teal/tests/testthat/test-FilterStates.R
Lines 68 to 80 in de11f87
testthat::test_that("get_call returns a call filtering a data.frame based on a ChoicesFilterState", { | |
choices_dataset <- as.data.frame(list(choices = c("a", "b", "c"))) | |
filter_states <- FilterStates$new( | |
input_dataname = "choices_dataset", | |
output_dataname = "choices_output", | |
datalabel = "label" | |
) | |
filter_states$queue_initialize(list(ReactiveQueue$new())) | |
choices_filter <- ChoicesFilterState$new(x = c("a", "c"), varname = "choices") | |
filter_states$queue_push(queue_index = 1, x = choices_filter, element_id = "test") | |
eval(isolate(filter_states$get_call())) | |
testthat::expect_equal(choices_output, choices_dataset[c(1, 3), , drop = FALSE]) | |
}) |
Do you think there is a point to it or should we leave it? SE is quite unique in the sense it contains two queues with filters, so setting it up is a little bit different.
@kpagacz could you check now to see if the tests are adequate? |
…tes' into 163_more_tests_for_SEFilteredStates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs any news?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
No News update is needed - it's not a change from master vs main perspective. It's a part of MAE refactor which has not been released yet
) Related to [teal.data PR insightsengineering#184](insightsengineering/teal.data#184) Make changes to `teal` because of the refactor to the JoinKeys class from R6 to S3. --------- Signed-off-by: Vedha Viyash <49812166+vedhav@users.noreply.github.com> Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com> Co-authored-by: go_gonzo <dawid.kaledkowski@gmail.com>
closes #163