Am 25.06.2010, 20:44 Uhr, schrieb Hanno Schlichting <>:

> 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  

I've kept them in but they can be converted easily to inline  
comments if necessary.

Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to