[TIP] unittest q: keeping track of the *right* number of tests

C. Titus Brown ctb at msu.edu
Sun Mar 22 18:20:44 PDT 2009


-> First issue that comes to mind is you will obviously have to clearly state
-> what potential resources or variable could be lacking to cause a test to not
-> be executed. That can be a chore in itself.

that's fairly easy; we only have a few special dependencies.

-> Second, depending on how your tests are written, you could potentially
-> automate a decent amount of the discovery through decorators. If you have
-> decorators flag what tests require what settings you can then import a
-> module and have the decorators simply record the details needed to run that
-> test. This obviously has a potential issue of errors in mis-stating what the
-> test really needs, but that could happen with writing them down by hand
-> anyway.

alas... python2.3. no decorators ;(

--titus
-- 
C. Titus Brown, ctb at msu.edu



More information about the testing-in-python mailing list