From b932143c8d56cfc6bbfff47f7db585540378671b Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Sat, 17 Aug 2024 18:09:11 +1200 Subject: [PATCH] ldb:tests:repack: use common api_base variables Signed-off-by: Douglas Bagnall Reviewed-by: Andreas Schneider --- lib/ldb/tests/python/repack.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/ldb/tests/python/repack.py b/lib/ldb/tests/python/repack.py index 0844cd24e58..3a7d18601cb 100644 --- a/lib/ldb/tests/python/repack.py +++ b/lib/ldb/tests/python/repack.py @@ -2,18 +2,14 @@ import os from unittest import TestCase import shutil from subprocess import check_output +import sys +sys.path.insert(0, "bin/python") import ldb -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, + tempdir, +) # Check enabling and disabling GUID indexing works and that the database is @@ -200,5 +196,4 @@ class GUIDIndexAndPackFormatTests(TestCase): if __name__ == '__main__': import unittest - unittest.TestProgram() -- 2.47.2