[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Idea for svntest refactoring

From: Branko Čibej <brane_at_xbc.nu>
Date: 2006-04-04 21:12:54 CEST

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

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.