This PR refactors the test_epiparameter() and assert_epiparameter() functions by pulling out the body of each function and merging in a new .validate_epiparameter() function, which is called by each of the exported functions.
If .validate_epiparameter() finds invalid components of <epiparameter> objects it surfaces messages which test_epiparameter() and assert_epiparameter() use to message or error with, respectively.
The unit tests of test_epiparameter() and assert_epiparameter() have also been simplified.
Unifying the bodies of test_epiparameter() and assert_epiparameter() was suggested in #394.
This PR refactors the
test_epiparameter()
andassert_epiparameter()
functions by pulling out the body of each function and merging in a new.validate_epiparameter()
function, which is called by each of the exported functions.If
.validate_epiparameter()
finds invalid components of<epiparameter>
objects it surfaces messages whichtest_epiparameter()
andassert_epiparameter()
use to message or error with, respectively.The unit tests of
test_epiparameter()
andassert_epiparameter()
have also been simplified.Unifying the bodies of
test_epiparameter()
andassert_epiparameter()
was suggested in #394.