From: Douglas Bagnall Date: Sat, 17 Aug 2024 06:13:00 +0000 (+1200) Subject: ldb:tests:index: use abi_base X-Git-Tag: tdb-1.4.13~1166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83f3afaac42ff7d2606c380b59c94f55b377fae0;p=thirdparty%2Fsamba.git ldb:tests:index: use abi_base Signed-off-by: Douglas Bagnall Reviewed-by: Andreas Schneider --- diff --git a/lib/ldb/tests/python/index.py b/lib/ldb/tests/python/index.py index c1da76d67e2..15c3bbb2483 100755 --- a/lib/ldb/tests/python/index.py +++ b/lib/ldb/tests/python/index.py @@ -27,21 +27,15 @@ ldb behaves correctly in those circumstances. import os from unittest import TestCase import sys +sys.path.insert(0, "bin/python") import ldb import shutil - -TDB_PREFIX = "tdb://" -MDB_PREFIX = "mdb://" - - -def tempdir(): - import tempfile - try: - dir_prefix = os.path.join(os.environ["SELFTEST_PREFIX"], "tmp") - except KeyError: - dir_prefix = None - return tempfile.mkdtemp(dir=dir_prefix) +from api_base import ( + TDB_PREFIX, + MDB_PREFIX, + tempdir, +) def contains(result, dn):