From 83f3afaac42ff7d2606c380b59c94f55b377fae0 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Sat, 17 Aug 2024 18:13:00 +1200 Subject: [PATCH] ldb:tests:index: use abi_base Signed-off-by: Douglas Bagnall Reviewed-by: Andreas Schneider --- lib/ldb/tests/python/index.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) 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): -- 2.47.2