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

Re: [PATCH] Start tests for Python bindings of svn_auth_*

From: Jelmer Vernooij <jelmer_at_samba.org>
Date: 2007-12-09 16:23:45 CET

Am Sonntag, den 09.12.2007, 08:26 +0100 schrieb Lieven Govaerts:
> Jelmer Vernooij wrote:
> > [[[
> > Start testsuite for the Python bindings of svn_auth_*.
> >
> > * subversion/bindings/swig/python/tests/run_all.py: Run auth tests.
> > * subversion/bindings/swig/python/tests/auth.py: New file.
> > ]]]

> Besides testing for exceptions, can you check if the functions did what
> you wanted? Examples of what I'm thinking of inline.
>
> > === added file 'subversion/bindings/swig/python/tests/auth.py'
> > --- subversion/bindings/swig/python/tests/auth.py 1970-01-01 00:00:00 +0000
> > +++ subversion/bindings/swig/python/tests/auth.py 2007-12-09 05:07:12 +0000
> > @@ -0,0 +1,20 @@
> > +import unittest, os, setup_path
> > +
> > +from svn import core
> > +
> > +class SubversionAuthTestCase(unittest.TestCase):
> > + """Test cases for the Subversion auth."""
> > +
> > + def test_open(self):
> > + baton = core.svn_auth_open([])
> Ex. assert baton
Fixed, thanks.

> > +
> > + def test_set_parameter(self):
> > + baton = core.svn_auth_open([])
> > + core.svn_auth_set_parameter(baton, "name", "somedata")
> Ex. assert core.svn_auth_get_parameter(baton, "name") == "somedata"
svn_auth_get_parameter() doesn't have Python bindings yet. It returns
arbitrary pointers (not necessarily strings) and I didn't want to touch
it until I could do a proper binding for it.

Cheers,

Jelmer

-- 
Jelmer Vernooij <jelmer_at_samba.org> - http://samba.org/~jelmer/
Jabber: jelmer@jabber.fsfe.org

Received on Sun Dec 9 16:24:18 2007

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.