Michael Haggerty wrote:
> I'd like to do some refactoring of svntest. The impetus for these ideas
> came from the difficulty I had in the cvs2svn project in creating
> multiple test cases with slight variations. I would have liked to pass
> callable class instances to main.run_tests() instead of function
> objects, so that I could store auxiliary information in the class
> instances. This was not possible because the svntest infrastructure is
> too rigid: it insists that test cases be based on naked function objects.
>
The idea sounds great.
However ... I do have one objection -- terminological rather than
technical. Calling the test functor a "predicate" is wrong -- it isn't a
predicate (XFail and Skip are -- see
http://en.wikipedia.org/wiki/Predicate, fourth item). I'd call it a
TestFunctor (http://en.wikipedia.org/wiki/Function_object).
Yes, I know that I originally created the private class _Predicate in
testcase.py; but that _is_ a predicate, it wraps the test case in a test
(admittedly a no-op test by default).
You'll still need both predicates (for XFail and Skip) and functors (for
the test case implementations).
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 4 21:13:25 2006