DataS-DHSC / PHStatsMethods

GNU General Public License v3.0
5 stars 0 forks source link

Test Coverage #110

Open HadleyBN opened 6 months ago

HadleyBN commented 6 months ago

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.

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.

cameron-stewartdhsc commented 4 months ago

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