pipresents-next icon indicating copy to clipboard operation
pipresents-next copied to clipboard

Add unit tests

Open drewkeller opened this issue 10 years ago • 1 comments

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.

drewkeller avatar Sep 06 '14 13:09 drewkeller

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.

KenT2 avatar Sep 09 '14 20:09 KenT2