[Zope-CMF] Will the real test please step forward?
Charlie Clark
charlie.clark at clark-consulting.eu
Fri Jun 25 15:10:08 EDT 2010
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.
Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
More information about the Zope-CMF
mailing list