[Zope-CMF] Will the real test please step forward?
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
I've kept them in test_icons.py but they can be converted easily to inline
comments if necessary.
Clark Consulting & Research
More information about the Zope-CMF