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

Re: svn commit: r1155044 - in /subversion/trunk/subversion/bindings/ctypes-python: csvn/repos.py csvn/wc.py test/localrepos.py test/remoterepos.py test/wc.py

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Tue, 09 Aug 2011 09:38:13 +0100

On Mon, 2011-08-08 at 21:44 +0300, Daniel Shahaf wrote:
> julianfoad_at_apache.org wrote on Mon, Aug 08, 2011 at 18:32:08 -0000:
> > +++ subversion/trunk/subversion/bindings/ctypes-python/test/remoterepos.py Mon Aug 8 18:32:07 2011
> > @@ -46,17 +46,24 @@ class RemoteRepositoryTestCase(unittest.
> > dumpfile = open(os.path.join(os.path.split(__file__)[0],
> > 'test.dumpfile'))
> >
> > - # Just in case a preivous test instance was not properly cleaned up
> > - self.tearDown()
> > + # Just in case a previous test instance was not properly cleaned up
> > + self.remove_from_disk()
> > +
> > self.repos = LocalRepository(repos_location, create=True)
> > self.repos.load(dumpfile)
> > + self.repos.close()
> >
>
> Instead of an explicit .close(), could you rely on the object's cleanup
> method (reverse of __init__) cleaning it, when the last reference to
> self.repos is removed on the next line?

I'd like to do that, and I tried, defining a '__del__' method, but I
couldn't seem to get it to be called.

- Julian

> +1 on the rest of the patch.
>
> > self.repos = RemoteRepository(repos_url)
Received on 2011-08-09 10:39:31 CEST

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.