From 4c380dcc41084e197eaec2a762a448b268176235 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Tue, 22 Sep 2015 05:45:05 +0000 Subject: [PATCH] move tests out of installed package dir --- {warcprox/tests => tests}/__init__.py | 0 {warcprox/tests => tests}/conftest.py | 0 {warcprox/tests => tests}/test_dump-anydbm.py | 3 ++- {warcprox/tests => tests}/test_warcprox.py | 0 4 files changed, 2 insertions(+), 1 deletion(-) rename {warcprox/tests => tests}/__init__.py (100%) rename {warcprox/tests => tests}/conftest.py (100%) rename {warcprox/tests => tests}/test_dump-anydbm.py (97%) rename {warcprox/tests => tests}/test_warcprox.py (100%) 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