From: Douglas Bagnall Date: Fri, 16 Aug 2024 02:06:53 +0000 (+1200) Subject: ldb:pytest:api: remove pass-though tearDowns X-Git-Tag: tdb-1.4.13~1178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1fd6e2b07360a631ac123a595c454474f985058;p=thirdparty%2Fsamba.git ldb:pytest:api: remove pass-though tearDowns The result is exactly the same, unless we previously had the wrong class name in the pass-through, in which case the result is *probably* the same, only more correct. 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 bdd69f07734..206cfc363cc 100755 --- a/lib/ldb/tests/python/api.py +++ b/lib/ldb/tests/python/api.py @@ -83,9 +83,6 @@ class LdbBaseTest(TestCase): except AttributeError: self.prefix = TDB_PREFIX - def tearDown(self): - super(LdbBaseTest, self).tearDown() - def url(self): return self.prefix + self.filename @@ -806,9 +803,6 @@ class SimpleLdbLmdb(SimpleLdb): self.index = MDB_INDEX_OBJ super(SimpleLdbLmdb, self).setUp() - def tearDown(self): - super(SimpleLdbLmdb, self).tearDown() - class SimpleLdbNoLmdb(LdbBaseTest): @@ -819,9 +813,6 @@ class SimpleLdbNoLmdb(LdbBaseTest): self.index = MDB_INDEX_OBJ super(SimpleLdbNoLmdb, self).setUp() - def tearDown(self): - super(SimpleLdbNoLmdb, self).tearDown() - def test_lmdb_disabled(self): self.testdir = tempdir() self.filename = os.path.join(self.testdir, "test.ldb") @@ -1995,9 +1986,6 @@ class SearchTestsLmdb(SearchTests): self.index = MDB_INDEX_OBJ super(SearchTestsLmdb, self).setUp() - def tearDown(self): - super(SearchTestsLmdb, self).tearDown() - class IndexedSearchTests(SearchTests): """Test searches using the index, to ensure the index doesn't @@ -2137,9 +2125,6 @@ class GUIDIndexedSearchTestsLmdb(GUIDIndexedSearchTests): self.prefix = MDB_PREFIX super(GUIDIndexedSearchTestsLmdb, self).setUp() - def tearDown(self): - super(GUIDIndexedSearchTestsLmdb, self).tearDown() - class GUIDIndexedDNFilterSearchTestsLmdb(GUIDIndexedDNFilterSearchTests): @@ -2149,9 +2134,6 @@ class GUIDIndexedDNFilterSearchTestsLmdb(GUIDIndexedDNFilterSearchTests): self.prefix = MDB_PREFIX super(GUIDIndexedDNFilterSearchTestsLmdb, self).setUp() - def tearDown(self): - super(GUIDIndexedDNFilterSearchTestsLmdb, self).tearDown() - class GUIDAndOneLevelIndexedSearchTestsLmdb(GUIDAndOneLevelIndexedSearchTests): @@ -2161,9 +2143,6 @@ class GUIDAndOneLevelIndexedSearchTestsLmdb(GUIDAndOneLevelIndexedSearchTests): self.prefix = MDB_PREFIX super(GUIDAndOneLevelIndexedSearchTestsLmdb, self).setUp() - def tearDown(self): - super(GUIDAndOneLevelIndexedSearchTestsLmdb, self).tearDown() - class AddModifyTests(LdbBaseTest): def tearDown(self): @@ -2374,9 +2353,6 @@ class AddModifyTestsLmdb(AddModifyTests): self.index = MDB_INDEX_OBJ super(AddModifyTestsLmdb, self).setUp() - def tearDown(self): - super(AddModifyTestsLmdb, self).tearDown() - class IndexedAddModifyTests(AddModifyTests): """Test searches using the index, to ensure the index doesn't @@ -2513,9 +2489,6 @@ class GuidIndexedAddModifyTestsLmdb(GUIDIndexedAddModifyTests): self.prefix = MDB_PREFIX super(GuidIndexedAddModifyTestsLmdb, self).setUp() - def tearDown(self): - super(GuidIndexedAddModifyTestsLmdb, self).tearDown() - class GuidTransIndexedAddModifyTestsLmdb(GUIDTransIndexedAddModifyTests): @@ -2525,9 +2498,6 @@ class GuidTransIndexedAddModifyTestsLmdb(GUIDTransIndexedAddModifyTests): self.prefix = MDB_PREFIX super(GuidTransIndexedAddModifyTestsLmdb, self).setUp() - def tearDown(self): - super(GuidTransIndexedAddModifyTestsLmdb, self).tearDown() - class BadIndexTests(LdbBaseTest): def setUp(self): @@ -2732,9 +2702,6 @@ class BadIndexTests(LdbBaseTest): self.assertEqual(len(res), 1) self.assertEqual(str(res[0].dn), "x=y,dc=samba,dc=org") - def tearDown(self): - super(BadIndexTests, self).tearDown() - class GUIDBadIndexTests(BadIndexTests): """Test Bad index things with GUID index mode""" @@ -2755,9 +2722,6 @@ class GUIDBadIndexTestsLmdb(BadIndexTests): self.IDXGUID = True super(GUIDBadIndexTestsLmdb, self).setUp() - def tearDown(self): - super(GUIDBadIndexTestsLmdb, self).tearDown() - class BatchModeTests(LdbBaseTest): @@ -2812,9 +2776,6 @@ class BatchModeTests(LdbBaseTest): enum = err.args[0] self.assertEqual(enum, ldb.ERR_OPERATIONS_ERROR) - def tearDown(self): - super(BatchModeTests, self).tearDown() - class DnTests(TestCase): @@ -3752,9 +3713,6 @@ class LdbResultTestsLmdb(LdbResultTests): self.index = MDB_INDEX_OBJ super(LdbResultTestsLmdb, self).setUp() - def tearDown(self): - super(LdbResultTestsLmdb, self).tearDown() - class BadTypeTests(TestCase): def test_control(self): @@ -3890,9 +3848,6 @@ class NestedTransactionTests(LdbBaseTest): # self.assertEqual(len(res), 0) self.assertEqual(len(res), 1) - def tearDown(self): - super(NestedTransactionTests, self).tearDown() - class LmdbNestedTransactionTests(NestedTransactionTests): @@ -3903,9 +3858,6 @@ class LmdbNestedTransactionTests(NestedTransactionTests): self.index = MDB_INDEX_OBJ super(LmdbNestedTransactionTests, self).setUp() - def tearDown(self): - super(LmdbNestedTransactionTests, self).tearDown() - if __name__ == '__main__': import unittest