[z3-five] Re: Functional doctests for Five
Tres Seaver
tseaver at zope.com
Wed Sep 29 17:45:35 MEST 2004
Philipp von Weitershausen wrote:
> Martijn Faassen wrote:
>
>>Philipp von Weitershausen wrote:
>>
>>>Martijn Faassen wrote:
>>
>>>>>Sidnei implemented functional doctests in ZopeTestCase;
>>>>>Create a branch to convert Five tests to this.
>>>>
>>>>All of them?
>>>
>>>Why not? :)
>>
>>Because I think some of the tests exercise python-level functionality,
>>though I think most don't and make sense as functional tests.
>
>
> I am converting regular Five unit tests to unit doctests and functional tests
> to functional doctests. I am just converting between two formats of writing
> down tests. I'm not changing the metrics by which we test.
Note that unless you convert them using the
"docstring-on-an-empty-method" spelling, you will be changing semantics
of the tests: the "tell-a-story-in-a-text-file" model deliberated does
*not* isolate tests from one another. This is my major beef with
doctests: the "isolated" spelling doesn't have the win that the "story"
case does, but the "story" case doesn't (can't) do as good a job of
"test one thing only."
For functional tests, I still don't find the test paradigm very
attractive: the raw, "converted-from-tcpwatch" files are *way* too
noisy, and easy to mess up during editing. Once cleaned, they aren't
*too* hard to work with, although I think we won't ever be able to show
them to non-programmers (which was a goal of the INI-file format my
framework uses).
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the z3-five
mailing list