pipresents-next
pipresents-next copied to clipboard
Add unit tests
PiPresents is complicated enough that I think it would benefit from unit testing. At least in some of the main classes.
I don't have much experience with python, but I found the standard python library has unit testing in it: https://docs.python.org/2/library/unittest.html
I don't have unit testing in all of my projects, but I'm very glad for it in the ones that I do. I can make changes, add features, etc. and be confident that I didn't break anything in the process.
I have written tests for some of the major modules when developing them but I have never found them useful when the module is integrated into Pi Presents. This is because most of the unit tests use a variety of values for profile data which can best be done when the module is running with the rest of Pi Presents as a test harness. In the past the test profiles have morphed into the example profiles that get published. What I am thinking of doing for [pipresents-gapless] is to maintain and publish the set of test profiles.