[Zope-CMF] Will the real test please step forward?
Charlie Clark
charlie.clark at clark-consulting.eu
Fri Jun 25 14:30:58 EDT 2010
Am 03.04.2010, 19:56 Uhr, schrieb Charlie Clark
<charlie.clark at clark-consulting.eu>:
> Am 03.04.2010, 19:47 Uhr, schrieb Tres Seaver <tseaver at palladion.com>:
>
>> Sounds right. I'm probably the guilty part here (or at least those look
>> like my style of testing ;).
>
> At least they're in there! Still working on mine for my new "absolut"
> skin.
This one is for Tres,
been cribbing shamelessly from the ursa tests (thanks!) and noticed
another duplicate:
def test_icon_wo_getIconURL_w_icon(self):
view = self._makeOne()
view.context.getIconURL = lambda: 'ICON'
view.context.icon = 'ICON2'
self.assertEqual(view.icon, 'ICON')
def test_icon_wo_getIconURL_w_icon(self):
view = self._makeOne()
view.context.icon = 'ICON'
self.assertEqual(view.icon, 'ICON')
What are the guidelines on docstrings in unit tests? I'm finding it
helpful to write some kind of narrative which says what parameters are
being twiddled and what I expect as a result. Doesn't stop the contortions
with the method names but might help otherwise.
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