On Mon, 2011-08-08 at 21:44 +0300, Daniel Shahaf wrote: > julianf...@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)