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

Re: [PATCH] Add more tests to the svn python bindings

From: David James <djames_at_collab.net>
Date: 2006-06-23 20:45:05 CEST

On 6/23/06, Madan U Sreenivasan <madan@collab.net> wrote:
> Hi,
>
> Pl. find attached some more tests for the svn.wc python bindings.

Nice patch, Madan! A few minor issues:

1. Instead of using failUnless and failUnlessRaises, please use
assert_ and assertRaises. This is more consistent with our existing
test cases.
2. Instead of saying 'failUnless(x == y)", use "assertEqual(x, y)".
This outputs a better error message if the test fails.
3. For the test case which throws SubversionException, please add a
comment. It should say something like "Ensure that setting svn:entry
props is not allowed". I trust that this behavior is correct (if not,
add a TODO explaining how it should normally behave.)

After these issues are fixed, +1 to commit.

> btw, I almost completed implementing XFail() for the bindings, when I
> realized that assertRaises()/failUnlessRaises() do the same thing. Why do
> we need XFail for the python bindings tests?

Good point. Actually, now that I think about it, assertRaises is
probably better than XFail, because you can test what exception is
raised. All tests which test for incorrect behaviour should contain a
TODO marker explaining what's wrong and how they should be fixed.

Cheers,

David

-- 
David James -- http://www.cs.toronto.edu/~james
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 23 20:45:53 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.