diff --git a/warcprox/tests/__init__.py b/tests/__init__.py similarity index 100% rename from warcprox/tests/__init__.py rename to tests/__init__.py diff --git a/warcprox/tests/conftest.py b/tests/conftest.py similarity index 100% rename from warcprox/tests/conftest.py rename to tests/conftest.py diff --git a/warcprox/tests/test_dump-anydbm.py b/tests/test_dump-anydbm.py similarity index 97% rename from warcprox/tests/test_dump-anydbm.py rename to tests/test_dump-anydbm.py index 4cca48d..6bb600d 100644 --- a/warcprox/tests/test_dump-anydbm.py +++ b/tests/test_dump-anydbm.py @@ -6,6 +6,7 @@ import tempfile import subprocess # to access the script from shell import sys import glob +import distutils # will try as python 3 then default to python 2 modules try: @@ -38,7 +39,7 @@ val1 = 'very first value' val2 = 'second value' py = sys.executable -dump_anydbm_loc = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "bin/dump-anydbm") +dump_anydbm_loc = distutils.spawn.find_executable("dump-anydbm") @pytest.fixture(scope="function") def gdbm_test_db(request): diff --git a/warcprox/tests/test_warcprox.py b/tests/test_warcprox.py similarity index 100% rename from warcprox/tests/test_warcprox.py rename to tests/test_warcprox.py