[Zope-CMF] Will the real test please step forward?

Tres Seaver tseaver at palladion.com
Fri Jun 25 15:49:27 EDT 2010

Hash: SHA1

Charlie Clark wrote:
> Am 25.06.2010, 20:44 Uhr, schrieb Hanno Schlichting <hanno at hannosch.eu>:
>> We generally don't use docstrings in test methods. These will show up
>> in the test output instead of the test method name and thus make it
>> harder to find a failing test.
> Thanks for the info -  I can't see them when I run the tests.
>> Normal inline comments are perfectly fine and should be used it the
>> tests intent isn't clear from the code. Most often the test code
>> should be sufficient to explain itself or require some refactoring.
> I added them because I wasn't happy with the test name. Even with short  
> tests if you have any kind of integration (say you have tools in the site)  
> I don't think you can rely on reading the code especially if someone isn't  
> very familiar with: a) the module being tested; b) the Python unit testing  
> framework.
> I've kept them in test_icons.py but they can be converted easily to inline  
> comments if necessary.

Please remove any docstrings in testcase methods.  Rename the test to
indicate better its semantics, and maybe add a comment, but don't make a
failing test harder to find by adding a docstring.

- --
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Zope-CMF mailing list