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.
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.