From: Douglas Bagnall Date: Sat, 17 Aug 2024 01:27:52 +0000 (+1200) Subject: ldb:tests:api.py uses .disconnect before rmdir X-Git-Tag: tdb-1.4.13~1176 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=16820c883d19572c0e25e84de4d408f2f3e16421;p=thirdparty%2Fsamba.git ldb:tests:api.py uses .disconnect before rmdir super.tearDown() was removing the tmpdir, but because self.ldb had the file open, the directory was not cleared. Signed-off-by: Douglas Bagnall Reviewed-by: Andreas Schneider --- diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py index ce9366dbc5e..e40009561a0 100755 --- a/lib/ldb/tests/python/api.py +++ b/lib/ldb/tests/python/api.py @@ -106,10 +106,10 @@ class SimpleLdb(LdbBaseTest): pass def tearDown(self): + self.ldb.disconnect() shutil.rmtree(self.testdir) super().tearDown() # Ensure the LDB is closed now, so we close the FD - del(self.ldb) def test_connect(self): ldb.Ldb(self.url(), flags=self.flags())