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

Test Coverage #110

Open
24 tasks
HadleyBN opened this issue Jun 3, 2024 · 1 comment
Open
24 tasks

Test Coverage #110

HadleyBN opened this issue Jun 3, 2024 · 1 comment
Labels
testing Related to internal test coverage

Comments

@HadleyBN
Copy link
Collaborator

HadleyBN commented Jun 3, 2024

Test coverage for certain functions needs to be improved to pick up any issues or changes in the future that could affect core functionality.

Functionality Tests
These ensure given correct data is passed a correct result is generated.

  • Proportions when group_cols = None
  • Rates when group_cols = None
  • Means when group_cols = None
  • ISRate when group_cols = None
  • ISRatio when group_cols = None
  • funnels (expand tests for calculate_funnel_points(), currently only one test - see R package.
  • utils - add test for get_calc_variables() function
  • utils_funnel
  • confidence_intervals - wilsons generic + changes wilsons into a single parametrised test like byars
  • confidence_intervals - byars generic
  • confidence_intervals - exact (lower, upper and generic)
  • confidence_intervals - student's t-dist
  • confidence_intervals - dobsons (lower, upper)
  • validations - tests need for check_kwargs() and group_args()

Error Handling Tests
Within each function, we run a series of validation checks on the parameters passed to ensure if anything wrong/invalid is passed through, we purposefully generate an error. This is minimises the risk the function generates an incorrect result and also helps the user to identify any issues in what they have passed by giving a useful error. Many of the functions use the same validation checks, these have been covered with in the validations script and are tested with in the tests_validations, so do not need to be covered. However, any ValueErrors or TypeError checks within the scripts themselves (i.e. DSR, rates, funnels, etc) do need specific error handling tests. See quantiles.py and test_quantiles.py for an example and how to layout the test script.

  • DSR - Add test for ValueError
  • ISRate
  • ISRatio
  • Funnels currently has no error handling tests, there should one error handling test for each individual ValueError or TypeError that occurs, to ensure if the conditions
  • Means - Add test for TypeError
  • Proportions - Add tests for ValueErrors (one of them is already being tested for, I would suggest moving them into a different class specifically for error handling just for readability.
  • utils - Add tests tests for join_euro_standard_pops() function (functionality testing for this function should be covered within the tests for DSRs.
  • utils_funnel
  • confidence_intervals,
  • validations - tests need for check_kwargs() and group_args()
@HadleyBN HadleyBN added the testing Related to internal test coverage label Jun 3, 2024
@cameron-stewartdhsc
Copy link
Collaborator

Week 1:

All group cols functions:

JB: Proportions, Rates
TV: ISRate, ISRatio
CS: Means

If complete and capacity, please claim ownership of test in comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to internal test coverage
Projects
None yet
Development

No branches or pull requests

2 participants