From: Douglas Bagnall Date: Wed, 28 Aug 2024 23:05:28 +0000 (+1200) Subject: ldb:test:api_search: tidy up files in each subclass X-Git-Tag: tdb-1.4.13~1159 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f7269c2fa364aaa6a46d75f1df584d333ba7d13e;p=thirdparty%2Fsamba.git ldb:test:api_search: tidy up files in each subclass Signed-off-by: Douglas Bagnall Reviewed-by: Andreas Schneider --- diff --git a/lib/ldb/tests/python/api_search.py b/lib/ldb/tests/python/api_search.py index 08e174c4f4f..54a0e496220 100644 --- a/lib/ldb/tests/python/api_search.py +++ b/lib/ldb/tests/python/api_search.py @@ -212,7 +212,10 @@ class SearchTests(LdbBaseTest): self.l = ldb.Ldb(self.url(), flags=self.flags(), options=self.options) - self.addCleanup(self.l.disconnect) + + def tearDown(self): + self.l.disconnect() + os.unlink(self.filename) def test_base(self): """Testing a search""" @@ -1395,7 +1398,10 @@ class LdbResultTests(LdbBaseTest): f"{self.id().rsplit('.',1)[1]}.ldb") shutil.copy(self.reference_db, self.filename) self.l = ldb.Ldb(self.url(), flags=self.flags()) - self.addCleanup(self.l.disconnect) + + def tearDown(self): + self.l.disconnect() + os.unlink(self.filename) def test_return_type(self): res = self.l.search()