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

430 use expect_no_error in tests instead of expect_error(, NA) #173

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

m7pr
Copy link
Contributor

@m7pr m7pr commented Jan 23, 2024

@m7pr m7pr added the core label Jan 23, 2024
Copy link
Contributor

github-actions bot commented Jan 23, 2024

badge

Code Coverage Summary

Filename                          Stmts    Miss  Cover    Missing
------------------------------  -------  ------  -------  ---------------------------------------------------------------------------------
R/all_choices.R                       1       0  100.00%
R/call_utils.R                      156     124  20.51%   14-23, 64, 66, 68, 107-431
R/check_selector.R                   32       0  100.00%
R/choices_labeled.R                 158      27  82.91%   59, 65, 70, 77, 93, 207-211, 215-220, 339-340, 342, 348, 374-381
R/choices_selected.R                 74      11  85.14%   191-219, 250
R/column_functions.R                  3       3  0.00%    13-16
R/data_extract_datanames.R           30       8  73.33%   9-13, 62-64
R/data_extract_filter_module.R      102      47  53.92%   87-100, 102-103, 105-122, 145-164
R/data_extract_module.R             300      68  77.33%   3, 115, 120, 137, 140-145, 147, 166-169, 197-243, 469, 474, 653, 663-664, 726-731
R/data_extract_read_module.R        137       7  94.89%   29, 34-36, 38, 133, 150
R/data_extract_select_module.R       32      18  43.75%   31-48
R/data_extract_single_module.R       60       2  96.67%   29, 42
R/data_extract_spec.R                32       0  100.00%
R/filter_spec.R                     186       1  99.46%   304
R/format_data_extract.R              16       1  93.75%   43
R/get_dplyr_call.R                  301       0  100.00%
R/get_merge_call.R                  280      29  89.64%   28-34, 45, 206-215, 369, 385-397
R/include_css_js.R                    5       0  100.00%
R/input_checks.R                     11       2  81.82%   18-19
R/merge_data_utils.R                  2       0  100.00%
R/merge_datasets.R                  135       6  95.56%   77, 227-231
R/merge_expression_module.R          60      11  81.67%   153-158, 175, 354-359
R/Queue.R                            23       0  100.00%
R/resolve_delayed.R                  16       4  75.00%   76-79
R/resolve.R                         114      44  61.40%   227-310
R/select_spec.R                      49       8  83.67%   103, 167-174
R/utils.R                            37      24  35.14%   26-39, 161-174
R/zzz.R                               2       2  0.00%    2-3
TOTAL                              2354     447  81.01%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: ca744fb

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Jan 23, 2024

Unit Tests Summary

  1 files   24 suites   6s ⏱️
189 tests 189 ✅ 0 💤 0 ❌
659 runs  659 ✅ 0 💤 0 ❌

Results for commit ca744fb.

♻️ This comment has been updated with latest results.

@averissimo averissimo self-assigned this Jan 23, 2024
Copy link
Contributor

@averissimo averissimo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Added some prefixes :-)

I ❤️ grep

grep -R -E "expect_|test_that\(" tests | grep -vE "testthat::expect|testthat::test_that" | grep -E "expect_|test_that\("

@m7pr
Copy link
Contributor Author

m7pr commented Jan 23, 2024

nice @averissimo

Copy link
Contributor

@gogonzo gogonzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm. No occurrences of expect_error with NA

@m7pr
Copy link
Contributor Author

m7pr commented Jan 24, 2024

When I was grepping I was looking for

  • lines with expect_error ending with NA)
  • lines in tests folder that are single NAs which was often included in expect_error that span multiple lines

Thanks for the review

@m7pr m7pr merged commit 2ac16df into main Jan 24, 2024
24 checks passed
@m7pr m7pr deleted the 430_expect_no_error_tests@main branch January 24, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants