Closed nawtrey closed 3 years ago
Pretty much a complete refactor of the primary testing module, test_kda.py
. I want to merge the performance PR #25 but I didn't trust the tests enough to do it. I would still like to address some more of the test recommendations in #3, but this is a really good start for now.
The addition of hypothesis
makes the state probability tests much more rigorous, and adding in assertions related to the partial/directional partial diagrams for the 5 test models is also a huge improvement. This should guard against regressions well enough for now, but I would certainly like to see more.
I was also able to find some errors in the code (which are fixed here) because they weren't being tested, which is bad, but the errors were not having any adverse affects on the primary functions so they weren't too bad.
All tests are passing, merging now.
Contributes to #3
Replaces parametrized state probability tests to use
hypothesis
to generate random values in a closed intervalAdds probability sum checks (normalized to 1)
Adds tests that verify the quantities of partial and directional partial diagrams that are generated
Increases code coverage of various errors across the code base